summaryrefslogtreecommitdiff
path: root/Build/source/utils
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-07-08 01:04:31 +0000
committerKarl Berry <karl@freefriends.org>2009-07-08 01:04:31 +0000
commit17ee31b51081b8281b652fa06b997918003f7772 (patch)
treec5c1420540fe9a31454c1450ec5d96c096f91a9b /Build/source/utils
parentbf914f81a2ff8552e1438251f4b6b56f9acf0b90 (diff)
asymptote 1.80
git-svn-id: svn://tug.org/texlive/trunk@14179 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
-rw-r--r--Build/source/utils/README2
-rw-r--r--Build/source/utils/asymptote/ChangeLog230
-rw-r--r--Build/source/utils/asymptote/Makefile.in1
-rw-r--r--Build/source/utils/asymptote/ReleaseNotes14
-rw-r--r--Build/source/utils/asymptote/asymptote.spec2
-rw-r--r--Build/source/utils/asymptote/base/animation.asy31
-rw-r--r--Build/source/utils/asymptote/base/lmfit.asy89
-rw-r--r--Build/source/utils/asymptote/builtin.cc26
-rw-r--r--Build/source/utils/asymptote/builtin.h1
-rw-r--r--Build/source/utils/asymptote/common.h5
-rwxr-xr-xBuild/source/utils/asymptote/configure18
-rw-r--r--Build/source/utils/asymptote/configure.ac2
-rw-r--r--Build/source/utils/asymptote/dec.cc2
-rw-r--r--Build/source/utils/asymptote/doc/CAD.pdfbin67399 -> 67399 bytes
-rw-r--r--Build/source/utils/asymptote/doc/FAQ/asy-faq.info2
-rw-r--r--Build/source/utils/asymptote/doc/Makefile.in1
-rw-r--r--Build/source/utils/asymptote/doc/asy.119
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.pdfbin1561333 -> 1565926 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.texi90
-rw-r--r--Build/source/utils/asymptote/doc/helix.asy6
-rw-r--r--Build/source/utils/asymptote/doc/options7
-rw-r--r--Build/source/utils/asymptote/doc/png/asymptote.info728
-rw-r--r--Build/source/utils/asymptote/errormsg.cc6
-rw-r--r--Build/source/utils/asymptote/errormsg.h3
-rw-r--r--Build/source/utils/asymptote/examples/filesurface.asy6
-rw-r--r--Build/source/utils/asymptote/fftw++.h17
-rw-r--r--Build/source/utils/asymptote/fileio.cc2
-rw-r--r--Build/source/utils/asymptote/fileio.h132
-rw-r--r--Build/source/utils/asymptote/glrender.cc208
-rw-r--r--Build/source/utils/asymptote/main.cc12
-rw-r--r--Build/source/utils/asymptote/runtime.cc1084
-rw-r--r--Build/source/utils/asymptote/runtime.h9
-rw-r--r--Build/source/utils/asymptote/runtime.in181
-rw-r--r--Build/source/utils/asymptote/settings.cc181
-rw-r--r--Build/source/utils/asymptote/settings.h3
-rw-r--r--Build/source/utils/asymptote/stm.cc16
-rw-r--r--Build/source/utils/asymptote/types.cc44
-rw-r--r--Build/source/utils/asymptote/util.cc27
-rw-r--r--Build/source/utils/asymptote/util.h4
-rw-r--r--Build/source/utils/asymptote/xstream.h8
40 files changed, 1999 insertions, 1220 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README
index 04051eefd5d..32cbfdb222a 100644
--- a/Build/source/utils/README
+++ b/Build/source/utils/README
@@ -5,7 +5,7 @@ You may freely use, modify and/or distribute this file.
Extra utilities we (optionally) compile for TeX Live.
See comments in ../texk/README.
-asymptote 1.79 - checked 3jul09
+asymptote 1.80 - checked 8jul09
update to TL from CTAN, to include prebuilt doc.
see http://tug.org/texlive/build.html#asymptote
diff --git a/Build/source/utils/asymptote/ChangeLog b/Build/source/utils/asymptote/ChangeLog
index c3345a45f71..89db0b017a5 100644
--- a/Build/source/utils/asymptote/ChangeLog
+++ b/Build/source/utils/asymptote/ChangeLog
@@ -1,4 +1,234 @@
------------------------------------------------------------------------
+r4494 | jcbowman | 2009-07-06 18:06:06 -0600 (Mon, 06 Jul 2009) | 1 line
+Changed paths:
+ M /trunk/asymptote/xstream.h
+
+Reinstate missing prototypes under CYGWIN
+------------------------------------------------------------------------
+r4493 | jcbowman | 2009-07-06 17:56:40 -0600 (Mon, 06 Jul 2009) | 1 line
+Changed paths:
+ M /trunk/asymptote/xstream.h
+
+Work around missing RPC definition under CYGWIN.
+------------------------------------------------------------------------
+r4492 | jcbowman | 2009-07-06 17:23:08 -0600 (Mon, 06 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/settings.cc
+
+Simplify code.
+
+------------------------------------------------------------------------
+r4491 | jcbowman | 2009-07-06 15:29:09 -0600 (Mon, 06 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/Makefile.in
+
+Update asymptote.info in install-prebuilt because of version.texi dependency.
+
+------------------------------------------------------------------------
+r4490 | jcbowman | 2009-07-06 14:49:09 -0600 (Mon, 06 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/errormsg.cc
+ M /trunk/asymptote/errormsg.h
+ M /trunk/asymptote/settings.cc
+ M /trunk/asymptote/settings.h
+ M /trunk/asymptote/stm.cc
+
+Optionally inform user how to ignore a warning.
+
+------------------------------------------------------------------------
+r4489 | jcbowman | 2009-07-06 13:43:30 -0600 (Mon, 06 Jul 2009) | 6 lines
+Changed paths:
+ M /trunk/asymptote/builtin.cc
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/errormsg.cc
+ M /trunk/asymptote/runtime.in
+ M /trunk/asymptote/settings.cc
+ M /trunk/asymptote/settings.h
+ M /trunk/asymptote/util.cc
+
+Make array.default(j=n) delete only entry j.
+
+Add warn(string) and nowarn(string) functions, along with settings.warnings
+
+Change "PATH" to "LOCATION" in error message.
+
+------------------------------------------------------------------------
+r4488 | jcbowman | 2009-07-05 23:02:24 -0600 (Sun, 05 Jul 2009) | 4 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+
+Mention psview as a better (and free) alternative to gsview for MSDOS users.
+
+Update documentation.
+
+------------------------------------------------------------------------
+r4487 | jcbowman | 2009-07-05 22:05:56 -0600 (Sun, 05 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/xstream.h
+
+Remove obsolete CYGWIN code.
+
+------------------------------------------------------------------------
+r4486 | jcbowman | 2009-07-05 19:49:35 -0600 (Sun, 05 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/xstream.h
+
+Work around u_quad_t conversion conflict.
+
+------------------------------------------------------------------------
+r4485 | jcbowman | 2009-07-05 10:29:05 -0600 (Sun, 05 Jul 2009) | 5 lines
+Changed paths:
+ M /trunk/asymptote/builtin.cc
+ M /trunk/asymptote/builtin.h
+ M /trunk/asymptote/dec.cc
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/fileio.cc
+ M /trunk/asymptote/fileio.h
+ M /trunk/asymptote/runtime.in
+ M /trunk/asymptote/types.cc
+
+Add virtual fields name, mode, line, csv, word, singlereal, singleint,
+signed to files.
+
+Simplify single precision and signed interface routines.
+
+------------------------------------------------------------------------
+r4484 | jcbowman | 2009-07-05 10:10:35 -0600 (Sun, 05 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/lmfit.asy
+
+Add comments.
+
+------------------------------------------------------------------------
+r4483 | jcbowman | 2009-07-04 20:39:50 -0600 (Sat, 04 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/base/animation.asy
+
+Fix animations with global=false.
+
+------------------------------------------------------------------------
+r4482 | jcbowman | 2009-07-04 15:39:12 -0600 (Sat, 04 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/main.cc
+
+Use pthread_join instead of pthread_kill.
+
+------------------------------------------------------------------------
+r4481 | jcbowman | 2009-07-04 14:29:24 -0600 (Sat, 04 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/helix.asy
+ M /trunk/asymptote/examples/filesurface.asy
+
+Minor simplifications.
+
+------------------------------------------------------------------------
+r4480 | jcbowman | 2009-07-04 13:05:54 -0600 (Sat, 04 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/fftw++.h
+
+Update to version 1.04.
+
+------------------------------------------------------------------------
+r4479 | jcbowman | 2009-07-04 12:20:09 -0600 (Sat, 04 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/glrender.cc
+
+Initialize lighting only in home().
+
+------------------------------------------------------------------------
+r4478 | jcbowman | 2009-07-04 12:08:30 -0600 (Sat, 04 Jul 2009) | 4 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/glrender.cc
+ M /trunk/asymptote/settings.cc
+
+Don't use POSIX timers by default due to portability issues.
+
+Call home() before quit to return to idle state and reset parameters.
+
+------------------------------------------------------------------------
+r4477 | jcbowman | 2009-07-04 12:05:07 -0600 (Sat, 04 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/main.cc
+
+Exit GUI gracefully.
+
+------------------------------------------------------------------------
+r4476 | jcbowman | 2009-07-04 01:53:43 -0600 (Sat, 04 Jul 2009) | 4 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/glrender.cc
+ M /trunk/asymptote/settings.cc
+
+Force zoom/menu to be unmodified.
+
+Update documentation.
+
+------------------------------------------------------------------------
+r4475 | jcbowman | 2009-07-04 01:32:54 -0600 (Sat, 04 Jul 2009) | 9 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/glrender.cc
+ M /trunk/asymptote/settings.cc
+
+Fix left-button zoom/menu binding bug.
+
+Add new settings zoomfactor, zoomstep, spinstep, arcballradius, resizestep,
+and doubleclick.
+
+Improve doubleclick emulation by adding a timeout (default 200ms).
+
+Re-instate default zoom/menu right-button assignment.
+
+------------------------------------------------------------------------
+r4474 | jcbowman | 2009-07-03 16:43:19 -0600 (Fri, 03 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/settings.cc
+
+Enable all warnings when debugging.
+
+------------------------------------------------------------------------
+r4473 | jcbowman | 2009-07-03 16:28:54 -0600 (Fri, 03 Jul 2009) | 3 lines
+Changed paths:
+ M /trunk/asymptote/settings.cc
+ M /trunk/asymptote/settings.h
+ M /trunk/asymptote/stm.cc
+
+Add setting warn that allows one to enable or disable warnings like
+writeoverloaded.
+
+------------------------------------------------------------------------
+r4472 | jcbowman | 2009-07-03 01:39:13 -0600 (Fri, 03 Jul 2009) | 4 lines
+Changed paths:
+ M /trunk/asymptote/common.h
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/fileio.h
+ M /trunk/asymptote/runtime.in
+ M /trunk/asymptote/util.cc
+ M /trunk/asymptote/util.h
+ M /trunk/asymptote/xstream.h
+
+Improve interace to routines for setting single precision mode: remove the
+unused x argument, distinguishing the integer case with a new bool signedint
+argument before the file.
+
+------------------------------------------------------------------------
+r4471 | jcbowman | 2009-07-02 11:39:13 -0600 (Thu, 02 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/asymptote/settings.cc
+
+Fix TeXLive docdir.
+
+------------------------------------------------------------------------
+r4470 | jcbowman | 2009-07-02 01:54:52 -0600 (Thu, 02 Jul 2009) | 1 line
+Changed paths:
+ M /trunk/asymptote/configure.ac
+
+Increment version to 1.80svn.
+------------------------------------------------------------------------
r4469 | jcbowman | 2009-07-02 00:26:57 -0600 (Thu, 02 Jul 2009) | 2 lines
Changed paths:
M /trunk/asymptote/doc/asymptote.texi
diff --git a/Build/source/utils/asymptote/Makefile.in b/Build/source/utils/asymptote/Makefile.in
index 2fb4e47b8c9..9fec3091437 100644
--- a/Build/source/utils/asymptote/Makefile.in
+++ b/Build/source/utils/asymptote/Makefile.in
@@ -145,6 +145,7 @@ keywords.cc: keywords.pl camp.l
envcompleter.d: keywords.cc
asy-keywords.el: asy
+ @echo Creating $@;
$(ASY) -l > asy.list
ls $(addsuffix /*.asy,$(KEYWORDS)) | grep -v plain\* | \
grep -v three_\* | grep -v featpost3D | xargs $(ASY) -l >> asy.list
diff --git a/Build/source/utils/asymptote/ReleaseNotes b/Build/source/utils/asymptote/ReleaseNotes
index a106b69db9d..5ca5a938534 100644
--- a/Build/source/utils/asymptote/ReleaseNotes
+++ b/Build/source/utils/asymptote/ReleaseNotes
@@ -1,3 +1,17 @@
+Release Notes for Version 1.80
+
+The interface for changing the precision for XDR/binary files was
+simplified; file parameters can now be queried as virtual members.
+The zoom/menu action was improved to emulate a double-click and assigned again
+to the right mouse button; a left-button binding bug was fixed.
+New settings zoomfactor, zoomstep, spinstep, arcballradius, resizestep, and
+doubleclick were added. The OpenGL thread is now exited gracefully; idle
+state and other parameters are properly reset on quitting. Lighting is now
+initialized only in home(). Animations with global=false were fixed.
+An improved (and free) psview PostScript viewer is now suggested for MSDOS
+users. A mechanism for disabling annoying warnings like "writeoverloaded"
+was implemented. The documentation directory under TeXLive was fixed.
+
Release Notes for Version 1.79
The perp vector calculation in the solids module was fixed. A bug in the
diff --git a/Build/source/utils/asymptote/asymptote.spec b/Build/source/utils/asymptote/asymptote.spec
index 25d2853df92..6374285e377 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: 1.79
+Version: 1.80
Release: 1%{?dist}
Summary: Descriptive vector graphics language
diff --git a/Build/source/utils/asymptote/base/animation.asy b/Build/source/utils/asymptote/base/animation.asy
index 2b7519c700a..6fcd2ad70e2 100644
--- a/Build/source/utils/asymptote/base/animation.asy
+++ b/Build/source/utils/asymptote/base/animation.asy
@@ -38,8 +38,8 @@ struct animation {
this.global=global;
}
- string basename(string prefix=prefix) {
- return "_"+stripextension(prefix);
+ string basename(string prefix=stripextension(prefix)) {
+ return "_"+prefix;
}
string name(string prefix, int index) {
@@ -47,7 +47,7 @@ struct animation {
}
private string nextname() {
- string name=name(prefix,index);
+ string name=basename(name(prefix,index));
++index;
return name;
}
@@ -61,8 +61,9 @@ struct animation {
void add(picture pic=currentpicture, fit fit=NoBox) {
if(global) {
+ ++index;
pictures.push(pic.copy());
- } else this.shipout(nextname(),fit(prefix,pic));
+ } else this.shipout(fit(prefix,pic));
}
void purge(bool keep=settings.keep) {
@@ -89,6 +90,7 @@ struct animation {
void export(string prefix=prefix, fit fit=NoBox,
bool multipage=false, bool view=false) {
if(pictures.length == 0) return;
+ if(!global) multipage=false;
rescale(pictures);
frame multi;
bool inlinetex=settings.inlinetex;
@@ -119,6 +121,7 @@ struct animation {
string load(int frames, real delay=animationdelay, string options="",
bool multipage=false) {
+ if(!global) multipage=false;
string s="\animategraphics["+options+"]{"+format("%.18f",1000/delay,"C")+
"}{"+basename();
if(!multipage) s += "+";
@@ -129,13 +132,13 @@ struct animation {
string pdf(fit fit=NoBox, real delay=animationdelay, string options="",
bool keep=settings.keep, bool multipage=true) {
if(settings.inlinetex) multipage=true;
+ if(!global) multipage=false;
if(settings.tex != "pdflatex")
abort("inline pdf animations require -tex pdflatex");
if(settings.outformat != "") settings.outformat="pdf";
string filename=basename();
string pdfname=filename+".pdf";
- bool single=global && multipage;
if(global)
export(filename,fit,multipage=multipage);
@@ -147,28 +150,28 @@ struct animation {
void exitfunction() {
if(currentexitfunction != null) currentexitfunction();
this.purge();
- if(single)
+ if(multipage)
delete(pdfname);
}
atexit(exitfunction);
}
- if(!single)
+ if(!multipage)
delete(pdfname);
- return load(pictures.length,delay,options,multipage);
+ return load(index,delay,options,multipage);
}
int movie(fit fit=NoBox, int loops=0, real delay=animationdelay,
string format=settings.outformat == "" ? "gif" : settings.outformat,
string options="", bool keep=settings.keep) {
- if(global && format == "pdf") {
- export(fit,multipage=true,view=true);
- return 0;
- }
-
- if(global)
+ if(global) {
+ if(format == "pdf") {
+ export(fit,multipage=true,view=true);
+ return 0;
+ }
export(fit);
+ }
return merge(loops,delay,format,options,keep);
}
}
diff --git a/Build/source/utils/asymptote/base/lmfit.asy b/Build/source/utils/asymptote/base/lmfit.asy
index d0367547b74..72745625824 100644
--- a/Build/source/utils/asymptote/base/lmfit.asy
+++ b/Build/source/utils/asymptote/base/lmfit.asy
@@ -23,6 +23,18 @@
*/
/*
+ Fitting $n$ data points $(x_1, y_1 \pm \Delta y_1), \dots, (x_n, y_n \pm \Delta y_n)$
+ to a function $f$ that depends on $m$ parameters $a_1, \dots, a_m$ means minimizing
+ the least-squares sum
+ %
+ \begin{equation*}
+ \sum_{i = 1}^n \left( \frac{y_i - f(a_1, \dots, a_m; x_i)}{\Delta y_i} \right)^2
+ \end{equation*}
+ %
+ with respect to the parameters $a_1, \dots, a_m$.
+*/
+
+/*
This module provides an implementation of the Levenberg--Marquardt
(LM) algorithm, converted from the C lmfit routine by Joachim Wuttke
(see http://www.messen-und-deuten.de/lmfit/).
@@ -747,16 +759,20 @@ void lm_minimize(int m_dat, int n_par, real[] par, lm_evaluate_ftype evaluate, l
// convenience functions; wrappers of lm_minimize
-struct FitControl {
- real squareSumTolerance;
- real approximationTolerance;
- real desiredOrthogonality;
- real epsilon;
- real stepBound;
- int maxIterations;
- bool verbose;
- void operator init(real squareSumTolerance, real approximationTolerance, real desiredOrthogonality, real epsilon, real stepBound, int maxIterations, bool verbose) {
+/*
+ The structure FitControl specifies various control parameters.
+*/
+struct FitControl {
+ real squareSumTolerance; // relative error desired in the sum of squares
+ real approximationTolerance; // relative error between last two approximations
+ real desiredOrthogonality; // orthogonality desired between the residue vector and its derivatives
+ real epsilon; // step used to calculate the jacobian
+ real stepBound; // initial bound to steps in the outer loop
+ int maxIterations; // maximum number of iterations
+ bool verbose; // whether to print detailed information about every iteration, or nothing
+
+ void operator init(real squareSumTolerance=LM_USERTOL, real approximationTolerance=LM_USERTOL, real desiredOrthogonality=LM_USERTOL, real epsilon=LM_USERTOL, real stepBound=100, int maxIterations=100, bool verbose=false) {
this.squareSumTolerance = squareSumTolerance;
this.approximationTolerance = approximationTolerance;
this.desiredOrthogonality = desiredOrthogonality;
@@ -779,30 +795,44 @@ struct FitControl {
}
};
+FitControl operator init() {
+ return FitControl();
+}
+
FitControl defaultControl;
-defaultControl.squareSumTolerance = LM_USERTOL;
-defaultControl.approximationTolerance = LM_USERTOL;
-defaultControl.desiredOrthogonality = LM_USERTOL;
-defaultControl.epsilon = LM_USERTOL;
-defaultControl.stepBound = 100;
-defaultControl.maxIterations = 100;
-defaultControl.verbose = false;
+/*
+ Upon returning, this structure provides information about the fit.
+*/
struct FitResult {
- restricted real norm;
- restricted int iterations;
- restricted int status;
+ real norm; // norm of the residue vector
+ int iterations; // actual number of iterations
+ int status; // status of minimization
- void operator init(real norm, int status, int iterations) {
+ void operator init(real norm, int iterations, int status) {
this.norm = norm;
- this.status = status;
this.iterations = iterations;
+ this.status = status;
}
};
-// Fits data points (xdata, ydata ± errors) to the given function using the given parameters.
+/*
+ Fits data points to a function that depends on some parameters.
+
+ Parameters:
+ - xdata: Array of x values.
+ - ydata: Array of y values.
+ - errors: Array of experimental errors; each element must be strictly positive
+ - function: Fit function.
+ - parameters: Parameter array. Before calling fit(), this must contain the initial guesses for the parameters.
+ Upon return, it will contain the solution parameters.
+ - control: object of type FitControl that controls various aspects of the fitting procedure.
+
+ Returns:
+ An object of type FitResult that conveys information about the fitting process.
+*/
FitResult fit(real[] xdata, real[] ydata, real[] errors, real function(real[], real), real[] parameters, FitControl control=defaultControl) {
int m_dat = min(xdata.length, ydata.length);
int n_par = parameters.length;
@@ -831,7 +861,20 @@ FitResult fit(real[] xdata, real[] ydata, real[] errors, real function(real[], r
}
-// Fits data points (xdata, ydata) to the given function using the given parameters.
+/*
+ Fits data points to a function that depends on some parameters.
+
+ Parameters:
+ - xdata: Array of x values.
+ - ydata: Array of y values.
+ - function: Fit function.
+ - parameters: Parameter array. Before calling fit(), this must contain the initial guesses for the parameters.
+ Upon return, it will contain the solution parameters.
+ - control: object of type FitControl that controls various aspects of the fitting procedure.
+
+ Returns:
+ An object of type FitResult that conveys information about the fitting process.
+*/
FitResult fit(real[] xdata, real[] ydata, real function(real[], real), real[] parameters, FitControl control=defaultControl) {
return fit(xdata, ydata, array(min(xdata.length, ydata.length), 1.0), function, parameters, control);
}
diff --git a/Build/source/utils/asymptote/builtin.cc b/Build/source/utils/asymptote/builtin.cc
index 9802b6d1197..ae998acf322 100644
--- a/Build/source/utils/asymptote/builtin.cc
+++ b/Build/source/utils/asymptote/builtin.cc
@@ -1341,6 +1341,10 @@ void base_venv(venv &ve)
formal(IntRealFunction(),"f"),
formal(realArray(),"a"));
+ addFunc(ve,single,primFile(),"single",formal(primFile(),"file"),
+ formal(primBoolean(),"real",true),
+ formal(primBoolean(),"int",true));
+
#ifdef HAVE_LIBFFTW3
addFunc(ve,pairArrayFFT,pairArray(),"fft",formal(pairArray(),"a"),
formal(primInt(),"sign",true));
@@ -1378,17 +1382,22 @@ namespace run {
double infinity=cbrt(DBL_MAX); // Reduced for tension atleast infinity
-void arrayDeleteHelper(vm::stack *Stack)
+void arrayDeleteHelper(stack *Stack)
{
array *a=pop<array *>(Stack);
item itj=pop(Stack);
+ bool jdefault=isdefault(itj);
item iti=pop(Stack);
+ Int i,j;
if(isdefault(iti)) {
+ if(jdefault) {
(*a).clear();
return;
+ } else i=j=get<Int>(itj);
+ } else {
+ i=get<Int>(iti);
+ j=jdefault ? i : get<Int>(itj);
}
- Int i=get<Int>(iti);
- Int j=isdefault(itj) ? i : get<Int>(itj);
size_t asize=checkArray(a);
if(a->cyclic() && asize > 0) {
@@ -1417,4 +1426,15 @@ void arrayDeleteHelper(vm::stack *Stack)
(*a).erase((*a).begin()+i,(*a).begin()+j+1);
}
+// Set file to read/write single-precision real and int XDR values.
+void single(stack *Stack)
+{
+ bool integer=pop<bool>(Stack,true);
+ bool real=pop<bool>(Stack,true);
+ file *File=pop<file *>(Stack);
+ File->SingleReal(real);
+ File->SingleInt(integer);
+ Stack->push(File);
+}
+
}
diff --git a/Build/source/utils/asymptote/builtin.h b/Build/source/utils/asymptote/builtin.h
index cac2f2a69b3..67f9165ec6c 100644
--- a/Build/source/utils/asymptote/builtin.h
+++ b/Build/source/utils/asymptote/builtin.h
@@ -47,6 +47,7 @@ types::record *getGSLModule();
namespace run {
extern double infinity;
+void single(vm::stack *Stack);
void arrayDeleteHelper(vm::stack *Stack);
}
diff --git a/Build/source/utils/asymptote/common.h b/Build/source/utils/asymptote/common.h
index f2796f5241d..347e7cd1b8d 100644
--- a/Build/source/utils/asymptote/common.h
+++ b/Build/source/utils/asymptote/common.h
@@ -28,16 +28,19 @@
#define Int_MAX LONG_LONG_MAX
#define Int_MIN LONG_LONG_MIN
typedef long long Int;
+typedef unsigned long long unsignedInt;
#else
#undef HAVE_LONG_LONG
#ifdef HAVE_LONG
#define Int_MAX LONG_MAX
#define Int_MIN LONG_MIN
typedef long Int;
+typedef unsigned long unsignedInt;
#else
#define Int_MAX INT_MAX
#define Int_MIN INT_MIN
-#define Int int
+typedef int Int;
+typedef unsigned int unsignedInt;
#endif
#endif
diff --git a/Build/source/utils/asymptote/configure b/Build/source/utils/asymptote/configure
index 87a81d40311..05e1a656b7f 100755
--- a/Build/source/utils/asymptote/configure
+++ b/Build/source/utils/asymptote/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for Asymptote 1.79.
+# Generated by GNU Autoconf 2.63 for Asymptote 1.80.
#
# Report bugs to <http://sourceforge.net/projects/asymptote>.
#
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='Asymptote'
PACKAGE_TARNAME='asymptote'
-PACKAGE_VERSION='1.79'
-PACKAGE_STRING='Asymptote 1.79'
+PACKAGE_VERSION='1.80'
+PACKAGE_STRING='Asymptote 1.80'
PACKAGE_BUGREPORT='http://sourceforge.net/projects/asymptote'
# Factoring default headers for most tests.
@@ -1294,7 +1294,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 1.79 to adapt to many kinds of systems.
+\`configure' configures Asymptote 1.80 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1355,7 +1355,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Asymptote 1.79:";;
+ short | recursive ) echo "Configuration of Asymptote 1.80:";;
esac
cat <<\_ACEOF
@@ -1465,7 +1465,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Asymptote configure 1.79
+Asymptote configure 1.80
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1479,7 +1479,7 @@ 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 1.79, which was
+It was created by Asymptote $as_me 1.80, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -11496,7 +11496,7 @@ exec 6>&1
# 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 1.79, which was
+This file was extended by Asymptote $as_me 1.80, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11555,7 +11555,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-Asymptote config.status 1.79
+Asymptote config.status 1.80
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/Build/source/utils/asymptote/configure.ac b/Build/source/utils/asymptote/configure.ac
index 0ced142cf5d..f88b6adef0d 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],[1.79],[http://sourceforge.net/projects/asymptote])
+AC_INIT([Asymptote],[1.80],[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 7c7ed1edd59..fefc096fdc5 100644
--- a/Build/source/utils/asymptote/dec.cc
+++ b/Build/source/utils/asymptote/dec.cc
@@ -769,7 +769,7 @@ void recorddec::transRecordInitializer(coenv &e, record *parent)
position here=getPos();
// This is equivalent to the code
- // A operator init() { return new A; };
+ // A operator init() { return new A; }
// where A is the name of the record.
formals formals(here);
simpleName recordName(here, id);
diff --git a/Build/source/utils/asymptote/doc/CAD.pdf b/Build/source/utils/asymptote/doc/CAD.pdf
index 88f6368ed92..293bebcda19 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.info b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
index 4112c7fc9c3..079d2754bc9 100644
--- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
+++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
@@ -9,7 +9,7 @@ END-INFO-DIR-ENTRY
File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir)
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
- 02 Jul 2009
+ 06 Jul 2009
This is the list of Frequently Asked Questions about Asymptote (asy).
diff --git a/Build/source/utils/asymptote/doc/Makefile.in b/Build/source/utils/asymptote/doc/Makefile.in
index 8199088ac9d..e15881d1230 100644
--- a/Build/source/utils/asymptote/doc/Makefile.in
+++ b/Build/source/utils/asymptote/doc/Makefile.in
@@ -83,6 +83,7 @@ install: man faq install-man
cd FAQ; $(MAKE) install
install-prebuilt: install-man
+ touch png/asymptote.info
cd png; $(MAKE) install
cd FAQ; $(MAKE) install-prebuilt
diff --git a/Build/source/utils/asymptote/doc/asy.1 b/Build/source/utils/asymptote/doc/asy.1
index 3ec3130e9aa..e47d5714dc9 100644
--- a/Build/source/utils/asymptote/doc/asy.1
+++ b/Build/source/utils/asymptote/doc/asy.1
@@ -39,6 +39,7 @@ 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].
@@ -79,6 +80,9 @@ Enable debugging messages [false].
.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
@@ -187,6 +191,9 @@ Suppress welcome message [false].
.B \-render n
Render 3D graphics using n pixels per bp (-1=auto) [-1].
.TP
+.B \-resizestep step
+Resize step [1.2].
+.TP
.B \-rgb
Convert cmyk colors to rgb [false].
.TP
@@ -196,6 +203,9 @@ Disable system call [true].
.B \-scroll n
Scroll standard output n lines at a time [0].
.TP
+.B \-spinstep deg/sec
+Spin speed [60].
+.TP
.B \-tabcompletion
Interactive prompt auto-completion [true].
.TP
@@ -235,11 +245,20 @@ Show version; command-line only.
.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 \-xformat format
GUI deconstruction format [png].
+.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.
diff --git a/Build/source/utils/asymptote/doc/asymptote.pdf b/Build/source/utils/asymptote/doc/asymptote.pdf
index a0be05216a0..277c86786da 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.texi b/Build/source/utils/asymptote/doc/asymptote.texi
index 1e5443228b7..d4865930da7 100644
--- a/Build/source/utils/asymptote/doc/asymptote.texi
+++ b/Build/source/utils/asymptote/doc/asymptote.texi
@@ -357,9 +357,24 @@ A working @TeX{} implementation (such as the one available at
@url{http://www.miktex.org}) will be required to typeset labels.
You will also need to install @code{GPL Ghostscript} from
@url{http://sourceforge.net/projects/ghostscript/}.
+
To view the default @code{PostScript} output, you can install the
program @code{gsview} available from
@url{http://www.cs.wisc.edu/~ghost/gsview/}.
+@anchor{psview}
+A better (and free) @code{PostScript} viewer available at
+@url{http://psview.sourceforge.net/} (which in particular works properly
+in interactive mode) unfortunately currently requires some manual
+configuration. Specifically, if version @code{x.xx} of psview is
+extracted to the directory @code{c:\Program Files\psview-x.xx} one
+needs to put
+@verbatim
+import settings;
+psviewer="c:\Program Files\psview-x.xx\psv.exe";
+@end verbatim
+@noindent
+in the optional @code{Asymptote} configuration file;
+@pxref{configuration file}).
The @code{ImageMagick} package from
@@ -400,7 +415,8 @@ Users of @code{ggv} will need to enable @code{Watch file} under
Users of @code{gsview} will need to enable @code{Options/Auto Redisplay}
(however, under @code{MSDOS} it is still necessary to click on the
@code{gsview} window; under @code{UNIX} one must manually redisplay by
-pressing the @code{r} key).
+pressing the @code{r} key). A better (and free) multiplatform
+alternative to @code{gsview} is psview (@pxref{psview}).
@cindex @code{settings}
@cindex configuration file
@@ -485,6 +501,15 @@ animate
@end verbatim
@noindent
+Warnings (such as "writeoverloaded") may be enabled or disabled with
+the functions
+@verbatim
+warn(string s);
+nowarn(string s);
+@end verbatim
+@noindent
+or by directly modifying the string array @code{warnings}.
+
@cindex command-line options
Configuration variables may also be set or overwritten with a
command-line option:
@@ -3634,23 +3659,35 @@ write(fout,"List: ",1,2,3); // Writes "List: 1 2 3"
@cindex @code{binput}
@cindex @code{boutput}
@cindex @code{single}
-@cindex @code{double}
+@cindex double precision
+@cindex @code{signed}
A file may also be opened with @code{xinput} or @code{xoutput}, instead of
@code{input} or @code{output}, to read or write
-double precision (64-bit) real values and single precision (32-bit)
-integer values in Sun Microsystem's @acronym{XDR} (External
+double precision (64-bit) reals and single precision (32-bit)
+integers in Sun Microsystem's @acronym{XDR} (External
Data Representation) portable binary format (available on all
@code{UNIX} platforms).
-A file may also be opened with @code{binput} or @code{boutput} to read
-or write double precision values in the native (nonportable)
-machine binary format. The function @code{file single(file,0.0)} may
-be used to set a file to read single precision real @acronym{XDR} or binary
-values; calling @code{file single(file,0.0,false)} sets it back to read
-doubles again. The functions @code{file single(file,0)} and
-@code{file single(file,0,false)} can be used to change the default
-integer precision (single). The functions @code{file
-single(file)} and @code{file single(file,false)} may be used to set the
-precision for both real and integer values.
+Alternatively, a file may also be opened with @code{binput} or
+@code{boutput} to read or write double precision reals and single
+precision integers in the native (nonportable) machine binary format.
+The function
+@code{file single(file f, bool real=true, bool int=true)} may
+be used to change the precision of real and integer I/O
+operations, respectively, for an @acronym{XDR} or binary file @code{f}.
+Similarly, the function @code{file signed(file f, bool b=true)}
+can be used to modify the signedness of integer reads and writes for
+an @acronym{XDR} or binary file @code{f}.
+Note that @code{single}, and @code{signed} modify and return their
+file arguments (to facilitate nested function calls).
+
+@cindex @code{name}
+@cindex @code{mode}
+@cindex @code{singlereal}
+@cindex @code{singleint}
+@cindex @code{signed}
+The virtual members @code{name}, @code{mode}, @code{singlereal},
+@code{singleint}, and @code{signed} may be used to query the
+respective parameters for a given file.
@cindex @code{eof}
@cindex @code{eol}
@@ -5325,6 +5362,18 @@ One, two, and three-dimensional arrays of the basic data types can be
output with the functions @code{write(file,T[])},
@code{write(file,T[][])}, @code{write(file,T[][][])}, respectively.
+@cindex @code{dimension}
+@cindex @code{line}
+@cindex @code{csv}
+@cindex @code{word}
+@cindex @code{single}
+@cindex @code{signed}
+Note that @code{dimension}, @code{line}, @code{csv},
+@code{word}, @code{single}, and @code{signed} modify and return their
+file arguments (to facilitate nested function calls).
+The virtual members @code{dimension}, @code{line}, @code{csv}, and
+@code{word} may be used to query the respective parameters for a given file.
+
@node Slices
@subsection Slices
@cindex slices
@@ -7475,7 +7524,7 @@ maximum screen dimension. The default settings
import settings;
leftbutton=new string[] {"rotate","zoom","shift","pan"};
middlebutton=new string[] {"menu"};
-rightbutton=new string[] {"zoom","rotateX","rotateY","rotateZ"};
+rightbutton=new string[] {"zoom/menu","rotateX","rotateY","rotateZ"};
wheelup=new string[] {"zoomin"};
wheeldown=new string[] {"zoomout"};
@end verbatim
@@ -7485,10 +7534,10 @@ bind the mouse buttons as follows:
@item Shift Left: zoom
@item Ctrl Left: shift viewport
@item Alt Left: pan
-@item Middle: menu
+@item Middle: menu (must be unmodified; ignores Shift, Ctrl, and Alt)
@item Wheel Up: zoom in
@item Wheel Down: zoom out
-@item Right: zoom
+@item Right: zoom/menu (must be unmodified)
@item Right double click: menu
@item Shift Right: rotate about the X axis
@item Ctrl Right: rotate about the Y axis
@@ -7537,8 +7586,8 @@ limited by the setting @code{maxviewport}, which restricts the maximum
width and height of the viewport. On @code{UNIX} systems some graphics
drivers support batch mode (@code{-noV}) rendering in an
iconified window; this can be enabled with the setting @code{iconify=true}.
-Other @code{UNIX} graphics drivers may require the command line setting
-@code{-glOptions=-indirect}.
+Some (broken) @code{UNIX} graphics drivers may require the command line setting
+@code{-glOptions=-indirect}, which requests (slower) indirect rendering.
@cindex @code{prc}
@cindex @code{views}
@@ -9259,4 +9308,5 @@ Melenchuk, Martin Wiebusch, and Stefan Knorr.
@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: viewportshift
+@c LocalWords: viewportshift signedint signedness psview multiplatform
+@c LocalWords: singlereal singleint
diff --git a/Build/source/utils/asymptote/doc/helix.asy b/Build/source/utils/asymptote/doc/helix.asy
index 768add3481a..0925e0821b1 100644
--- a/Build/source/utils/asymptote/doc/helix.asy
+++ b/Build/source/utils/asymptote/doc/helix.asy
@@ -15,6 +15,6 @@ draw(p,Arrow3);
scale(true);
-xaxis3(XZ()*"$x$",Bounds(),red,InTicks(Label,2,2));
-yaxis3(YZ()*"$y$",Bounds(),red,InTicks(beginlabel=false,Label,2,2));
-zaxis3(XZ()*"$z$",Bounds(),red,InTicks);
+xaxis3(XZ()*"$x$",Bounds,red,InTicks(Label,2,2));
+yaxis3(YZ()*"$y$",Bounds,red,InTicks(beginlabel=false,Label,2,2));
+zaxis3(XZ()*"$z$",Bounds,red,InTicks);
diff --git a/Build/source/utils/asymptote/doc/options b/Build/source/utils/asymptote/doc/options
index e81df8a83a9..be5bf16729c 100644
--- a/Build/source/utils/asymptote/doc/options
+++ b/Build/source/utils/asymptote/doc/options
@@ -5,6 +5,7 @@ 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]
-autoimport string Module to automatically import
-autoplain Enable automatic importing of plain [true]
@@ -18,6 +19,7 @@ Options (negate by replacing - with -no):
-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]
@@ -54,9 +56,11 @@ Options (negate by replacing - with -no):
-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]
-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/sec Spin speed [60]
-tabcompletion Interactive prompt auto-completion [true]
-tex engine latex|pdflatex|xelatex|tex|pdftex|context|none [latex]
-thick Render thick 3D lines [true]
@@ -70,6 +74,9 @@ Options (negate by replacing - with -no):
-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]
-xformat format GUI deconstruction format [png]
+-zoomfactor factor Zoom step factor [1.05]
+-zoomstep step Mouse motion zoom step [0.1]
diff --git a/Build/source/utils/asymptote/doc/png/asymptote.info b/Build/source/utils/asymptote/doc/png/asymptote.info
index cd17ef71bd5..37d42d767b5 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 1.79.
+This file documents `Asymptote', version 1.80.
`http://asymptote.sourceforge.net'
@@ -23,7 +23,7 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir)
Asymptote
*********
-This file documents `Asymptote', version 1.79.
+This file documents `Asymptote', version 1.80.
`http://asymptote.sourceforge.net'
@@ -329,9 +329,19 @@ where `x.xx' denotes the latest version.
A working TeX implementation (such as the one available at
`http://www.miktex.org') will be required to typeset labels. You will
also need to install `GPL Ghostscript' from
-`http://sourceforge.net/projects/ghostscript/'. To view the default
-`PostScript' output, you can install the program `gsview' available from
-`http://www.cs.wisc.edu/~ghost/gsview/'.
+`http://sourceforge.net/projects/ghostscript/'.
+
+ To view the default `PostScript' output, you can install the program
+`gsview' available from `http://www.cs.wisc.edu/~ghost/gsview/'. A
+better (and free) `PostScript' viewer available at
+`http://psview.sourceforge.net/' (which in particular works properly in
+interactive mode) unfortunately currently requires some manual
+configuration. Specifically, if version `x.xx' of psview is extracted
+to the directory `c:\Program Files\psview-x.xx' one needs to put
+import settings;
+psviewer="c:\Program Files\psview-x.xx\psv.exe";
+ in the optional `Asymptote' configuration file; *note configuration
+file::).
The `ImageMagick' package from
@@ -365,7 +375,9 @@ interactive mode to work properly. Users of `ggv' will need to enable
`Watch file' under `Edit/Postscript Viewer Preferences'. Users of
`gsview' will need to enable `Options/Auto Redisplay' (however, under
`MSDOS' it is still necessary to click on the `gsview' window; under
-`UNIX' one must manually redisplay by pressing the `r' key).
+`UNIX' one must manually redisplay by pressing the `r' key). A better
+(and free) multiplatform alternative to `gsview' is psview (*note
+psview::).
Configuration variables are most easily set as `Asymptote' variables
in an optional configuration file (by default, `.asy/config.asy' in the
@@ -423,7 +435,13 @@ dvips
convert
display
animate
- Configuration variables may also be set or overwritten with a
+ Warnings (such as "writeoverloaded") may be enabled or disabled with
+the functions
+warn(string s);
+nowarn(string s);
+ or by directly modifying the string array `warnings'.
+
+ Configuration variables may also be set or overwritten with a
command-line option:
asy -psviewer=gsview -V venn
@@ -2862,19 +2880,23 @@ write(fout,1); // Writes "1"
write(fout); // Writes a new line
write(fout,"List: ",1,2,3); // Writes "List: 1 2 3"
A file may also be opened with `xinput' or `xoutput', instead of
-`input' or `output', to read or write double precision (64-bit) real
-values and single precision (32-bit) integer values in Sun
-Microsystem's XDR (External Data Representation) portable binary format
-(available on all `UNIX' platforms). A file may also be opened with
-`binput' or `boutput' to read or write double precision values in the
-native (nonportable) machine binary format. The function `file
-single(file,0.0)' may be used to set a file to read single precision
-real XDR or binary values; calling `file single(file,0.0,false)' sets
-it back to read doubles again. The functions `file single(file,0)' and
-`file single(file,0,false)' can be used to change the default integer
-precision (single). The functions `file single(file)' and `file
-single(file,false)' may be used to set the precision for both real and
-integer values.
+`input' or `output', to read or write double precision (64-bit) reals
+and single precision (32-bit) integers in Sun Microsystem's XDR
+(External Data Representation) portable binary format (available on all
+`UNIX' platforms). Alternatively, a file may also be opened with
+`binput' or `boutput' to read or write double precision reals and single
+precision integers in the native (nonportable) machine binary format.
+The function `file single(file f, bool real=true, bool int=true)' may
+be used to change the precision of real and integer I/O operations,
+respectively, for an XDR or binary file `f'. Similarly, the function
+`file signed(file f, bool b=true)' can be used to modify the signedness
+of integer reads and writes for an XDR or binary file `f'. Note that
+`single', and `signed' modify and return their file arguments (to
+facilitate nested function calls).
+
+ The virtual members `name', `mode', `singlereal', `singleint', and
+`signed' may be used to query the respective parameters for a given
+file.
One can test a file for end-of-file with the boolean function
`eof(file)', end-of-line with `eol(file)', and for I/O errors with
@@ -4166,6 +4188,11 @@ real[][][] C=read3(fin);
output with the functions `write(file,T[])', `write(file,T[][])',
`write(file,T[][][])', respectively.
+ Note that `dimension', `line', `csv', `word', `single', and `signed'
+modify and return their file arguments (to facilitate nested function
+calls). The virtual members `dimension', `line', `csv', and `word' may
+be used to query the respective parameters for a given file.
+

File: asymptote.info, Node: Slices, Up: Arrays
@@ -6556,7 +6583,7 @@ There are four choices for viewing 3D `Asymptote' output:
the corresponding maximum screen dimension. The default settings import settings;
leftbutton=new string[] {"rotate","zoom","shift","pan"};
middlebutton=new string[] {"menu"};
- rightbutton=new string[] {"zoom","rotateX","rotateY","rotateZ"};
+ rightbutton=new string[] {"zoom/menu","rotateX","rotateY","rotateZ"};
wheelup=new string[] {"zoomin"};
wheeldown=new string[] {"zoomout"};
bind the mouse buttons as follows:
@@ -6568,13 +6595,14 @@ There are four choices for viewing 3D `Asymptote' output:
* Alt Left: pan
- * Middle: menu
+ * Middle: menu (must be unmodified; ignores Shift, Ctrl, and
+ Alt)
* Wheel Up: zoom in
* Wheel Down: zoom out
- * Right: zoom
+ * Right: zoom/menu (must be unmodified)
* Right double click: menu
@@ -6633,8 +6661,9 @@ There are four choices for viewing 3D `Asymptote' output:
restricts the maximum width and height of the viewport. On `UNIX'
systems some graphics drivers support batch mode (`-noV')
rendering in an iconified window; this can be enabled with the
- setting `iconify=true'. Other `UNIX' graphics drivers may require
- the command line setting `-glOptions=-indirect'.
+ setting `iconify=true'. Some (broken) `UNIX' graphics drivers may
+ require the command line setting `-glOptions=-indirect', which
+ requests (slower) indirect rendering.
3. Embed the 3D PRC format in a PDF file and view the resulting PDF
file with version `8.0' or later of `Adobe Reader'. In addition
@@ -7060,9 +7089,9 @@ draw(p,Arrow3);
scale(true);
-xaxis3(XZ()*"$x$",Bounds(),red,InTicks(Label,2,2));
-yaxis3(YZ()*"$y$",Bounds(),red,InTicks(beginlabel=false,Label,2,2));
-zaxis3(XZ()*"$z$",Bounds(),red,InTicks);
+xaxis3(XZ()*"$x$",Bounds,red,InTicks(Label,2,2));
+yaxis3(YZ()*"$y$",Bounds,red,InTicks(beginlabel=false,Label,2,2));
+zaxis3(XZ()*"$z$",Bounds,red,InTicks);
@@ -7656,6 +7685,7 @@ 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]
-autoimport string Module to automatically import
-autoplain Enable automatic importing of plain [true]
@@ -7669,6 +7699,7 @@ Options (negate by replacing - with -no):
-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]
@@ -7705,9 +7736,11 @@ Options (negate by replacing - with -no):
-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]
-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/sec Spin speed [60]
-tabcompletion Interactive prompt auto-completion [true]
-tex engine latex|pdflatex|xelatex|tex|pdftex|context|none [latex]
-thick Render thick 3D lines [true]
@@ -7721,8 +7754,11 @@ Options (negate by replacing - with -no):
-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]
-xformat format GUI deconstruction format [png]
+-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.
@@ -8193,9 +8229,9 @@ Index
* ---: Tutorial. (line 192)
* -=: Self & prefix operators.
(line 6)
-* -c: Options. (line 154)
-* -l: Options. (line 173)
-* -u: Options. (line 164)
+* -c: Options. (line 161)
+* -l: Options. (line 180)
+* -u: Options. (line 171)
* -V <1>: Tutorial. (line 41)
* -V: Configuring. (line 6)
* ..: Tutorial. (line 109)
@@ -8230,12 +8266,12 @@ Index
* ^=: Self & prefix operators.
(line 6)
* ^^: Tutorial. (line 197)
-* a4: Configuring. (line 63)
+* a4: Configuring. (line 65)
* abort: Data types. (line 321)
* abs <1>: Mathematical functions.
(line 35)
* abs: Data types. (line 60)
-* accel <1>: three. (line 451)
+* accel <1>: three. (line 453)
* accel: Paths and guides. (line 110)
* access: Import. (line 6)
* acknowledgments: Credits. (line 6)
@@ -8254,7 +8290,7 @@ Index
(line 48)
* alias <1>: Arrays. (line 187)
* alias: Structures. (line 54)
-* align: Options. (line 148)
+* align: Options. (line 155)
* Align: label. (line 12)
* all: Arrays. (line 331)
* Allow: Pens. (line 323)
@@ -8263,26 +8299,26 @@ Index
* and: Tutorial. (line 165)
* angle: Data types. (line 68)
* animate <1>: animation. (line 12)
-* animate <2>: Files. (line 148)
-* animate: Configuring. (line 69)
+* animate <2>: Files. (line 152)
+* animate: Configuring. (line 71)
* animation: animation. (line 6)
* annotate: annotate. (line 6)
-* antialias <1>: Options. (line 128)
-* antialias: three. (line 195)
+* antialias <1>: Options. (line 135)
+* antialias: three. (line 196)
* antialiasing: Compiling from UNIX source.
(line 16)
* append <1>: Arrays. (line 39)
* append: Files. (line 36)
-* arc: three. (line 260)
+* arc: three. (line 262)
* Arc: Paths and guides. (line 32)
* arc: Paths and guides. (line 22)
* ArcArrow: draw. (line 26)
-* ArcArrow3: three. (line 494)
+* ArcArrow3: three. (line 496)
* ArcArrows: draw. (line 26)
-* ArcArrows3: three. (line 494)
-* arclength <1>: three. (line 451)
+* ArcArrows3: three. (line 496)
+* arclength <1>: three. (line 453)
* arclength: Paths and guides. (line 137)
-* arctime <1>: three. (line 451)
+* arctime <1>: three. (line 453)
* arctime: Paths and guides. (line 141)
* arguments: Default arguments. (line 6)
* arithmetic operators: Arithmetic & logical.
@@ -8294,9 +8330,9 @@ Index
* Arrow: draw. (line 26)
* arrow: Drawing commands. (line 31)
* arrow keys: Tutorial. (line 21)
-* Arrow3: three. (line 494)
+* Arrow3: three. (line 496)
* Arrows: draw. (line 26)
-* Arrows3: three. (line 494)
+* Arrows3: three. (line 496)
* as: Import. (line 70)
* aSin: Mathematical functions.
(line 20)
@@ -8311,7 +8347,7 @@ Index
* asy.vim: Editing modes. (line 33)
* asymptote.sty: LaTeX usage. (line 6)
* asymptote.xml: Editing modes. (line 49)
-* ASYMPTOTE_CONFIG: Options. (line 101)
+* ASYMPTOTE_CONFIG: Options. (line 108)
* aTan: Mathematical functions.
(line 20)
* atan: Mathematical functions.
@@ -8323,8 +8359,8 @@ Index
* atleast: Tutorial. (line 165)
* attach <1>: graph. (line 405)
* attach: LaTeX usage. (line 32)
-* autoadjust: three. (line 331)
-* autoimport: Options. (line 97)
+* autoadjust: three. (line 333)
+* autoimport: Options. (line 104)
* automatic scaling: graph. (line 672)
* axialshade: fill. (line 43)
* axis <1>: graph3. (line 66)
@@ -8332,11 +8368,11 @@ Index
* azimuth: Data types. (line 124)
* babel: babel. (line 6)
* background color: Frames and pictures. (line 164)
-* BackView: three. (line 358)
+* BackView: three. (line 360)
* Bar: draw. (line 19)
-* Bar3: three. (line 494)
+* Bar3: three. (line 496)
* Bars: draw. (line 19)
-* Bars3: three. (line 494)
+* Bars3: three. (line 496)
* barsize: draw. (line 19)
* base modules: Base modules. (line 6)
* basealign: Pens. (line 164)
@@ -8344,18 +8380,18 @@ Index
* batch mode: Tutorial. (line 30)
* beep: Data types. (line 335)
* BeginArcArrow: draw. (line 26)
-* BeginArcArrow3: three. (line 494)
+* BeginArcArrow3: three. (line 496)
* BeginArrow: draw. (line 26)
-* BeginArrow3: three. (line 494)
+* BeginArrow3: three. (line 496)
* BeginBar: draw. (line 19)
-* BeginBar3: three. (line 494)
+* BeginBar3: three. (line 496)
* BeginDotMargin: draw. (line 42)
-* BeginDotMargin3: three. (line 510)
+* BeginDotMargin3: three. (line 512)
* BeginMargin: draw. (line 42)
-* BeginMargin3: three. (line 510)
+* BeginMargin3: three. (line 512)
* BeginPenMargin: draw. (line 42)
-* BeginPenMargin2: three. (line 510)
-* BeginPenMargin3: three. (line 510)
+* BeginPenMargin2: three. (line 512)
+* BeginPenMargin3: three. (line 512)
* BeginPoint: label. (line 57)
* Bessel: Mathematical functions.
(line 48)
@@ -8389,11 +8425,11 @@ Index
(line 6)
* Bottom: graph. (line 128)
* BottomTop: graph. (line 134)
-* BottomView: three. (line 358)
+* BottomView: three. (line 360)
* bounding box: Frames and pictures. (line 164)
* Bounds: graph3. (line 20)
* boutput: Files. (line 71)
-* box <1>: three. (line 282)
+* box <1>: three. (line 284)
* box: Frames and pictures. (line 22)
* bp: Tutorial. (line 17)
* break: Programming. (line 29)
@@ -8415,7 +8451,7 @@ Index
* cd: Files. (line 24)
* ceil: Mathematical functions.
(line 26)
-* center: three. (line 315)
+* center: three. (line 317)
* Center: label. (line 62)
* checker: Pens. (line 247)
* Chinese: unicode. (line 12)
@@ -8424,13 +8460,13 @@ Index
* Ci: Mathematical functions.
(line 48)
* circle <1>: flowchart. (line 57)
-* circle: three. (line 256)
+* circle: three. (line 258)
* Circle: Paths and guides. (line 17)
* circle: Paths and guides. (line 10)
* circlebarframe: markers. (line 18)
* CJK: unicode. (line 12)
* clear <1>: Debugger. (line 23)
-* clear: Files. (line 86)
+* clear: Files. (line 90)
* clip: fill. (line 110)
* cm: Tutorial. (line 63)
* cmyk: Pens. (line 34)
@@ -8444,7 +8480,7 @@ Index
* comma: Files. (line 59)
* comma-separated-value mode: Arrays. (line 362)
* command-line options <1>: Options. (line 6)
-* command-line options: Configuring. (line 77)
+* command-line options: Configuring. (line 85)
* comment character: Files. (line 15)
* compass directions: Tutorial. (line 94)
* Compiling from UNIX source: Compiling from UNIX source.
@@ -8454,12 +8490,12 @@ Index
* conditional <1>: Arithmetic & logical.
(line 73)
* conditional: Programming. (line 8)
-* config: Options. (line 101)
-* configuration file: Configuring. (line 21)
+* config: Options. (line 108)
+* configuration file: Configuring. (line 23)
* configuring: Configuring. (line 6)
* conj: Data types. (line 57)
* constructors: Structures. (line 95)
-* context: Options. (line 128)
+* context: Options. (line 135)
* continue <1>: Debugger. (line 31)
* continue: Programming. (line 29)
* contour: contour. (line 9)
@@ -8467,11 +8503,11 @@ Index
* controls <1>: three. (line 6)
* controls: Tutorial. (line 154)
* controlSpecifier: Paths and guides. (line 375)
-* convert <1>: Options. (line 128)
+* convert <1>: Options. (line 135)
* convert <2>: animation. (line 6)
-* convert <3>: Files. (line 148)
-* convert: Configuring. (line 69)
-* convertOptions: Options. (line 116)
+* convert <3>: Files. (line 152)
+* convert: Configuring. (line 71)
+* convertOptions: Options. (line 123)
* Coons shading: fill. (line 74)
* copy: Arrays. (line 174)
* Cos: Mathematical functions.
@@ -8493,7 +8529,7 @@ Index
* curl: Tutorial. (line 172)
* curlSpecifier: Paths and guides. (line 387)
* currentpen: Pens. (line 6)
-* currentprojection: three. (line 355)
+* currentprojection: three. (line 357)
* curve: slopefield. (line 20)
* custom axis types: graph. (line 138)
* custom mark routine: graph. (line 566)
@@ -8501,7 +8537,7 @@ Index
* cut: Paths and guides. (line 233)
* cycle <1>: three. (line 6)
* cycle: Tutorial. (line 46)
-* cyclic <1>: three. (line 451)
+* cyclic <1>: three. (line 453)
* cyclic <2>: Arrays. (line 39)
* cyclic: Paths and guides. (line 75)
* cyclicflag: Arrays. (line 39)
@@ -8518,7 +8554,7 @@ Index
* default arguments: Default arguments. (line 6)
* defaultformat: graph. (line 169)
* DefaultHead: draw. (line 26)
-* DefaultHead3: three. (line 494)
+* DefaultHead3: three. (line 496)
* defaultpen: Pens. (line 46)
* deferred drawing: simplex. (line 6)
* Degrees: Mathematical functions.
@@ -8527,12 +8563,12 @@ Index
(line 17)
* degrees: Data types. (line 73)
* delete <1>: Arrays. (line 39)
-* delete: Files. (line 143)
+* delete: Files. (line 147)
* description: Description. (line 6)
* diagonal: Arrays. (line 305)
* diamond: flowchart. (line 50)
* dimension: Arrays. (line 368)
-* dir <1>: three. (line 451)
+* dir <1>: three. (line 453)
* dir <2>: Paths and guides. (line 99)
* dir <3>: Data types. (line 85)
* dir: Search paths. (line 10)
@@ -8540,17 +8576,17 @@ Index
* directory: Files. (line 24)
* dirSpecifier: Paths and guides. (line 369)
* dirtime: Paths and guides. (line 147)
-* display: Configuring. (line 69)
+* display: Configuring. (line 71)
* do: Programming. (line 29)
* dot <1>: Data types. (line 98)
* dot: draw. (line 83)
* DotMargin: draw. (line 42)
-* DotMargin3: three. (line 510)
+* DotMargin3: three. (line 512)
* DotMargins: draw. (line 42)
-* DotMargins3: three. (line 510)
+* DotMargins3: three. (line 512)
* dotted: Pens. (line 92)
-* double: Files. (line 71)
-* double deferred drawing: three. (line 237)
+* double deferred drawing: three. (line 239)
+* double precision: Files. (line 71)
* Draw: Frames and pictures. (line 147)
* draw: draw. (line 110)
* Draw: draw. (line 26)
@@ -8558,8 +8594,8 @@ Index
* drawing commands: Drawing commands. (line 6)
* drawline: math. (line 9)
* drawtree: drawtree. (line 9)
-* dvips: Configuring. (line 69)
-* dvipsOptions: Options. (line 116)
+* dvips: Configuring. (line 71)
+* dvipsOptions: Options. (line 123)
* E <1>: Mathematical functions.
(line 48)
* E: Tutorial. (line 94)
@@ -8574,26 +8610,26 @@ Index
* embed: embed. (line 6)
* empty: Frames and pictures. (line 7)
* EndArcArrow: draw. (line 26)
-* EndArcArrow3: three. (line 494)
+* EndArcArrow3: three. (line 496)
* EndArrow: draw. (line 26)
-* EndArrow3: three. (line 494)
+* EndArrow3: three. (line 496)
* EndBar: draw. (line 19)
-* EndBar3: three. (line 494)
+* EndBar3: three. (line 496)
* EndDotMargin: draw. (line 42)
-* EndDotMargin3: three. (line 510)
+* EndDotMargin3: three. (line 512)
* endl: Files. (line 59)
* EndMargin: draw. (line 42)
-* EndMargin3: three. (line 510)
+* EndMargin3: three. (line 512)
* EndPenMargin: draw. (line 42)
-* EndPenMargin2: three. (line 510)
-* EndPenMargin3: three. (line 510)
+* EndPenMargin2: three. (line 512)
+* EndPenMargin3: three. (line 512)
* EndPoint: label. (line 57)
* envelope: Frames and pictures. (line 22)
-* environment variables: Configuring. (line 81)
+* environment variables: Configuring. (line 89)
* eof <1>: Arrays. (line 346)
-* eof: Files. (line 86)
+* eof: Files. (line 90)
* eol <1>: Arrays. (line 346)
-* eol: Files. (line 86)
+* eol: Files. (line 90)
* EPS: label. (line 80)
* erase <1>: Frames and pictures. (line 7)
* erase: Data types. (line 239)
@@ -8622,12 +8658,12 @@ Index
* extension <1>: MetaPost. (line 10)
* extension: Paths and guides. (line 228)
* external: embed. (line 28)
-* extrude: three. (line 445)
+* extrude: three. (line 447)
* F: Mathematical functions.
(line 48)
* fabs: Mathematical functions.
(line 6)
-* face: three. (line 529)
+* face: three. (line 531)
* factorial: Mathematical functions.
(line 39)
* Fedora: UNIX binary distributions.
@@ -8664,14 +8700,14 @@ Index
* fontcommand: Pens. (line 203)
* fontsize: Pens. (line 174)
* for: Programming. (line 8)
-* format <1>: Options. (line 128)
+* format <1>: Options. (line 135)
* format: Data types. (line 266)
* forum: Help. (line 6)
* frame: Frames and pictures. (line 7)
* freeglut: Compiling from UNIX source.
(line 16)
* from: Import. (line 17)
-* FrontView: three. (line 358)
+* FrontView: three. (line 360)
* function declarations: Functions. (line 67)
* function shading: fill. (line 95)
* Function shading: fill. (line 95)
@@ -8685,12 +8721,12 @@ Index
(line 39)
* geometry: geometry. (line 6)
* getc: Files. (line 30)
-* getpair: Files. (line 111)
-* getreal: Files. (line 111)
-* getstring: Files. (line 111)
-* gettriple: Files. (line 111)
-* glOptions <1>: Options. (line 116)
-* glOptions: three. (line 195)
+* getpair: Files. (line 115)
+* getreal: Files. (line 115)
+* getstring: Files. (line 115)
+* gettriple: Files. (line 115)
+* glOptions <1>: Options. (line 123)
+* glOptions: three. (line 196)
* GNU Scientific Library: Mathematical functions.
(line 48)
* gouraudshade: fill. (line 58)
@@ -8711,7 +8747,7 @@ Index
(line 48)
* GSL: Compiling from UNIX source.
(line 58)
-* gsOptions: Options. (line 116)
+* gsOptions: Options. (line 123)
* GUI: GUI. (line 6)
* GUI installation: GUI Installation. (line 6)
* GUI usage: GUI Usage. (line 6)
@@ -8727,13 +8763,13 @@ Index
* hex: Data types. (line 279)
* hexidecimal <1>: Pens. (line 59)
* hexidecimal: Data types. (line 279)
-* hidden surface removal: three. (line 529)
+* hidden surface removal: three. (line 531)
* histogram: Mathematical functions.
(line 39)
-* history: Files. (line 136)
+* history: Files. (line 140)
* historylines: Interactive mode. (line 42)
* HookHead: draw. (line 26)
-* HookHead3: three. (line 494)
+* HookHead3: three. (line 496)
* Horizontal: flowchart. (line 74)
* hypot: Mathematical functions.
(line 6)
@@ -8741,7 +8777,7 @@ Index
(line 48)
* i_scaled: Mathematical functions.
(line 48)
-* iconic: three. (line 195)
+* iconic: three. (line 196)
* identity <1>: Arrays. (line 302)
* identity <2>: Mathematical functions.
(line 6)
@@ -8749,9 +8785,9 @@ Index
* if: Programming. (line 8)
* IgnoreAspect: Frames and pictures. (line 58)
* image: palette. (line 34)
-* ImageMagick <1>: Options. (line 128)
+* ImageMagick <1>: Options. (line 135)
* ImageMagick <2>: animation. (line 6)
-* ImageMagick: Configuring. (line 69)
+* ImageMagick: Configuring. (line 71)
* implicit casts: Casts. (line 6)
* implicit linear solver: MetaPost. (line 10)
* implicit scaling: Implicit scaling. (line 6)
@@ -8779,22 +8815,22 @@ Index
* interp: Arithmetic & logical.
(line 76)
* interpolate: interpolate. (line 6)
-* intersect <1>: three. (line 451)
+* intersect <1>: three. (line 453)
* intersect <2>: math. (line 13)
* intersect: Paths and guides. (line 176)
-* intersectionpoint <1>: three. (line 451)
+* intersectionpoint <1>: three. (line 453)
* intersectionpoint <2>: math. (line 17)
* intersectionpoint: Paths and guides. (line 220)
-* intersectionpoints <1>: three. (line 451)
+* intersectionpoints <1>: three. (line 453)
* intersectionpoints: Paths and guides. (line 224)
-* intersections <1>: three. (line 451)
+* intersections <1>: three. (line 453)
* intersections: Paths and guides. (line 187)
* InTicks: graph3. (line 34)
* intMax: Data types. (line 28)
* intMin: Data types. (line 28)
* inverse <1>: Arrays. (line 308)
* inverse: Transforms. (line 16)
-* invert: three. (line 384)
+* invert: three. (line 386)
* invisible: Pens. (line 39)
* J: Mathematical functions.
(line 6)
@@ -8805,7 +8841,7 @@ Index
(line 48)
* Kate: Editing modes. (line 49)
* KDE editor: Editing modes. (line 49)
-* keyboard bindings:: three. (line 160)
+* keyboard bindings:: three. (line 161)
* keys: Arrays. (line 39)
* keywords: Named arguments. (line 6)
* Korean: unicode. (line 12)
@@ -8819,7 +8855,7 @@ Index
* Landscape: Frames and pictures. (line 95)
* lastcut: Paths and guides. (line 247)
* lasy-mode: Editing modes. (line 6)
-* latex: Options. (line 128)
+* latex: Options. (line 135)
* LaTeX fonts: Pens. (line 188)
* LaTeX usage: LaTeX usage. (line 6)
* latin1: latin1. (line 6)
@@ -8832,17 +8868,17 @@ Index
* LeftRight: graph. (line 280)
* LeftSide: label. (line 62)
* LeftTicks: graph. (line 155)
-* LeftView: three. (line 358)
+* LeftView: three. (line 360)
* legend <1>: graph. (line 421)
* legend <2>: draw. (line 64)
* legend: Drawing commands. (line 31)
* Legendre: Mathematical functions.
(line 48)
-* length <1>: three. (line 451)
+* length <1>: three. (line 453)
* length <2>: Arrays. (line 39)
* length <3>: Paths and guides. (line 66)
* length: Data types. (line 60)
-* letter: Configuring. (line 63)
+* letter: Configuring. (line 65)
* libm routines: Mathematical functions.
(line 6)
* libsigsegv <1>: Help. (line 33)
@@ -8877,10 +8913,10 @@ Index
* makepen: Pens. (line 296)
* map: Arrays. (line 144)
* Margin: draw. (line 42)
-* Margin3: three. (line 510)
-* margins: three. (line 243)
+* Margin3: three. (line 512)
+* margins: three. (line 245)
* Margins: draw. (line 42)
-* Margins3: three. (line 510)
+* Margins3: three. (line 512)
* mark: graph. (line 474)
* markangle: markers. (line 38)
* marker: graph. (line 474)
@@ -8890,14 +8926,14 @@ Index
* math: math. (line 6)
* mathematical functions: Mathematical functions.
(line 6)
-* max <1>: three. (line 451)
+* max <1>: three. (line 453)
* max <2>: Arrays. (line 231)
* max <3>: Frames and pictures. (line 7)
* max: Paths and guides. (line 260)
* maxbound: Data types. (line 104)
-* maxtile: three. (line 195)
+* maxtile: three. (line 196)
* maxtimes: Paths and guides. (line 215)
-* maxviewport: three. (line 195)
+* maxviewport: three. (line 196)
* merge: animation. (line 6)
* MetaPost: MetaPost. (line 6)
* MetaPost ... : Tutorial. (line 176)
@@ -8907,12 +8943,12 @@ Index
* MetaPost whatever: MetaPost. (line 10)
* Microsoft Windows: Microsoft Windows. (line 6)
* MidArcArrow: draw. (line 26)
-* MidArcArrow3: three. (line 494)
+* MidArcArrow3: three. (line 496)
* MidArrow: draw. (line 26)
-* MidArrow3: three. (line 494)
+* MidArrow3: three. (line 496)
* midpoint: Paths and guides. (line 161)
* MidPoint: label. (line 57)
-* min <1>: three. (line 451)
+* min <1>: three. (line 453)
* min <2>: Arrays. (line 224)
* min <3>: Frames and pictures. (line 7)
* min: Paths and guides. (line 256)
@@ -8922,6 +8958,7 @@ Index
* miterjoin: Pens. (line 134)
* miterlimit: Pens. (line 143)
* mm: Tutorial. (line 63)
+* mode: Files. (line 86)
* mouse: GUI. (line 6)
* mouse bindings: three. (line 129)
* Move: Pens. (line 335)
@@ -8930,6 +8967,7 @@ Index
* multisampling: Compiling from UNIX source.
(line 16)
* N: Tutorial. (line 94)
+* name: Files. (line 86)
* named arguments: Named arguments. (line 6)
* new <1>: Arrays. (line 112)
* new: Structures. (line 6)
@@ -8943,11 +8981,11 @@ Index
* NoFill <1>: Frames and pictures. (line 141)
* NoFill: draw. (line 26)
* NoMargin: draw. (line 42)
-* NoMargin3: three. (line 510)
+* NoMargin3: three. (line 512)
* none: Files. (line 59)
* None: draw. (line 19)
-* normal: three. (line 437)
-* nosafe: Options. (line 144)
+* normal: three. (line 439)
+* nosafe: Options. (line 151)
* NOT: Arithmetic & logical.
(line 80)
* NoTicks: graph. (line 155)
@@ -8955,15 +8993,15 @@ Index
* null: Structures. (line 6)
* nullpen <1>: Frames and pictures. (line 127)
* nullpen: label. (line 14)
-* NURBS: three. (line 335)
-* O: three. (line 251)
+* NURBS: three. (line 337)
+* O: three. (line 253)
* obj: obj. (line 9)
-* oblique: three. (line 296)
-* obliqueX: three. (line 304)
-* obliqueY: three. (line 311)
-* obliqueZ: three. (line 296)
+* oblique: three. (line 298)
+* obliqueX: three. (line 306)
+* obliqueY: three. (line 313)
+* obliqueZ: three. (line 298)
* ode: ode. (line 9)
-* offset: Options. (line 148)
+* offset: Options. (line 155)
* opacity: Pens. (line 218)
* open: Files. (line 11)
* OpenGL: three. (line 119)
@@ -8981,10 +9019,10 @@ Index
* OR: Arithmetic & logical.
(line 80)
* orientation: Frames and pictures. (line 95)
-* orthographic: three. (line 315)
+* orthographic: three. (line 317)
* outformat: three. (line 119)
* outprefix: Frames and pictures. (line 83)
-* output <1>: Options. (line 128)
+* output <1>: Options. (line 135)
* output: Files. (line 36)
* OutTicks: graph3. (line 34)
* overloading functions: Functions. (line 44)
@@ -8996,9 +9034,9 @@ Index
* pair <1>: Data types. (line 41)
* pair: Tutorial. (line 17)
* pairs: Arrays. (line 248)
-* paperheight: Configuring. (line 63)
-* papertype: Configuring. (line 63)
-* paperwidth: Configuring. (line 63)
+* paperheight: Configuring. (line 65)
+* papertype: Configuring. (line 65)
+* paperwidth: Configuring. (line 65)
* parametric surface: graph3. (line 100)
* parametrized curve: graph. (line 626)
* patch-dependent colors: three. (line 75)
@@ -9009,18 +9047,18 @@ Index
* path[]: Tutorial. (line 197)
* patterns <1>: patterns. (line 6)
* patterns: Pens. (line 234)
-* pdflatex: Options. (line 128)
+* pdflatex: Options. (line 135)
* pdfviewer: Configuring. (line 6)
-* pdfviewerOptions: Options. (line 116)
+* pdfviewerOptions: Options. (line 123)
* pen: Pens. (line 6)
* PenMargin: draw. (line 42)
-* PenMargin2: three. (line 510)
-* PenMargin3: three. (line 510)
+* PenMargin2: three. (line 512)
+* PenMargin3: three. (line 512)
* PenMargins: draw. (line 42)
-* PenMargins2: three. (line 510)
-* PenMargins3: three. (line 510)
+* PenMargins2: three. (line 512)
+* PenMargins3: three. (line 512)
* perpendicular: geometry. (line 6)
-* perspective: three. (line 335)
+* perspective: three. (line 337)
* picture: Frames and pictures. (line 35)
* picture alignment: Frames and pictures. (line 205)
* piecewisestraight: Paths and guides. (line 82)
@@ -9028,16 +9066,16 @@ Index
(line 48)
* plain: plain. (line 6)
* planar: three. (line 83)
-* plane: three. (line 278)
-* planeproject: three. (line 434)
-* point <1>: three. (line 451)
+* plane: three. (line 280)
+* planeproject: three. (line 436)
+* point <1>: three. (line 453)
* point: Paths and guides. (line 85)
* polar: Data types. (line 119)
* polargraph: graph. (line 90)
* polygon: graph. (line 474)
* pop: Arrays. (line 39)
* Portrait: Frames and pictures. (line 95)
-* postcontrol <1>: three. (line 451)
+* postcontrol <1>: three. (line 453)
* postcontrol: Paths and guides. (line 130)
* postfix operators: Self & prefix operators.
(line 19)
@@ -9046,9 +9084,9 @@ Index
* PostScript subpath: Tutorial. (line 197)
* pow10: Mathematical functions.
(line 6)
-* prc: three. (line 212)
-* precision: Files. (line 86)
-* precontrol <1>: three. (line 451)
+* prc: three. (line 214)
+* precision: Files. (line 90)
+* precontrol <1>: three. (line 453)
* precontrol: Paths and guides. (line 123)
* prefix operators: Self & prefix operators.
(line 6)
@@ -9057,11 +9095,11 @@ Index
* pstoedit: PostScript to Asymptote.
(line 6)
* psviewer: Configuring. (line 6)
-* psviewerOptions: Options. (line 116)
+* psviewerOptions: Options. (line 123)
* pt: Tutorial. (line 63)
* public: Structures. (line 6)
* push: Arrays. (line 39)
-* python: Configuring. (line 28)
+* python: Configuring. (line 30)
* Python usage: Interactive mode. (line 58)
* quadraticroots: Arrays. (line 311)
* quarticroots: math. (line 22)
@@ -9074,7 +9112,7 @@ Index
* radialshade: fill. (line 49)
* radians: Mathematical functions.
(line 17)
-* radius <1>: three. (line 451)
+* radius <1>: three. (line 453)
* radius: Paths and guides. (line 119)
* Rainbow: palette. (line 12)
* rand: Mathematical functions.
@@ -9086,7 +9124,7 @@ Index
* read3: Arrays. (line 386)
* reading: Files. (line 11)
* reading string arrays: Arrays. (line 353)
-* readline: Files. (line 128)
+* readline: Files. (line 132)
* real: Data types. (line 33)
* realDigits: Data types. (line 33)
* realEpsilon: Data types. (line 33)
@@ -9101,8 +9139,8 @@ Index
* reltime: Paths and guides. (line 153)
* remainder: Mathematical functions.
(line 6)
-* rename: Files. (line 145)
-* render <1>: Options. (line 128)
+* rename: Files. (line 149)
+* render <1>: Options. (line 135)
* render: three. (line 119)
* replace: Data types. (line 252)
* resetdefaultpen: Pens. (line 349)
@@ -9110,11 +9148,11 @@ Index
* restore: Frames and pictures. (line 261)
* restricted: Structures. (line 6)
* return: Debugger. (line 48)
-* reverse <1>: three. (line 451)
+* reverse <1>: three. (line 453)
* reverse <2>: Arrays. (line 149)
* reverse <3>: Paths and guides. (line 164)
* reverse: Data types. (line 248)
-* rewind: Files. (line 86)
+* rewind: Files. (line 90)
* rfind: Data types. (line 229)
* rgb: Pens. (line 30)
* Riemann zeta function: Mathematical functions.
@@ -9122,7 +9160,7 @@ Index
* Right: graph. (line 277)
* RightSide: label. (line 62)
* RightTicks: graph. (line 155)
-* RightView: three. (line 358)
+* RightView: three. (line 360)
* Rotate: label. (line 37)
* Rotate(pair z): label. (line 40)
* round: Mathematical functions.
@@ -9136,18 +9174,18 @@ Index
* runtime imports: Import. (line 101)
* Russian: unicode. (line 7)
* S: Tutorial. (line 94)
-* safe: Options. (line 144)
+* safe: Options. (line 151)
* save: Frames and pictures. (line 258)
-* saveline: Files. (line 128)
-* scale: three. (line 413)
+* saveline: Files. (line 132)
+* scale: three. (line 415)
* Scale: graph. (line 688)
* scale <1>: graph. (line 672)
* scale: Transforms. (line 39)
* Scale: label. (line 46)
-* scale3: three. (line 410)
+* scale3: three. (line 412)
* scaled graph: graph. (line 653)
* scientific graph: graph. (line 386)
-* scroll: Files. (line 102)
+* scroll: Files. (line 106)
* search: Arrays. (line 167)
* search paths: Search paths. (line 6)
* Seascape: Frames and pictures. (line 100)
@@ -9155,25 +9193,27 @@ Index
* secondaryX: graph. (line 803)
* secondaryY: graph. (line 803)
* seconds: Data types. (line 299)
-* seek: Files. (line 86)
-* seekeof: Files. (line 86)
+* seek: Files. (line 90)
+* seekeof: Files. (line 90)
* segmentation fault: Help. (line 33)
* self operators: Self & prefix operators.
(line 6)
* sequence: Arrays. (line 131)
-* settings <1>: Options. (line 101)
-* settings: Configuring. (line 21)
+* settings <1>: Options. (line 108)
+* settings: Configuring. (line 23)
* sgn: Mathematical functions.
(line 26)
* shading: fill. (line 32)
-* shift <1>: three. (line 398)
+* shift <1>: three. (line 400)
* shift: Transforms. (line 27)
* Shift: label. (line 34)
* shiftless: Transforms. (line 53)
* shipout: Frames and pictures. (line 83)
-* showtarget: three. (line 315)
+* showtarget: three. (line 317)
* Si: Mathematical functions.
(line 48)
+* signed <1>: Arrays. (line 398)
+* signed: Files. (line 71)
* SimpleHead: draw. (line 26)
* simplex: simplex. (line 6)
* simpson: Mathematical functions.
@@ -9182,14 +9222,17 @@ Index
(line 20)
* sin: Mathematical functions.
(line 6)
+* single <1>: Arrays. (line 398)
* single: Files. (line 71)
+* singleint: Files. (line 86)
+* singlereal: Files. (line 86)
* sinh: Mathematical functions.
(line 6)
-* size <1>: Options. (line 128)
-* size <2>: three. (line 451)
+* size <1>: Options. (line 135)
+* size <2>: three. (line 453)
* size <3>: Frames and pictures. (line 43)
* size: Paths and guides. (line 71)
-* size3: three. (line 240)
+* size3: three. (line 242)
* slant: Transforms. (line 45)
* Slant: label. (line 43)
* sleep: Data types. (line 329)
@@ -9218,7 +9261,7 @@ Index
* step: Debugger. (line 39)
* stickframe: markers. (line 16)
* stop: Debugger. (line 10)
-* straight: three. (line 451)
+* straight: three. (line 453)
* Straight: graph. (line 31)
* straight: Paths and guides. (line 78)
* strftime: Data types. (line 291)
@@ -9228,7 +9271,7 @@ Index
* strptime: Data types. (line 299)
* struct: Structures. (line 6)
* structures: Structures. (line 6)
-* subpath <1>: three. (line 451)
+* subpath <1>: three. (line 453)
* subpath: Paths and guides. (line 167)
* subpictures: Frames and pictures. (line 103)
* substr: Data types. (line 244)
@@ -9240,8 +9283,8 @@ Index
* surface <1>: graph3. (line 100)
* surface: three. (line 47)
* SVN: Subversion. (line 6)
-* system <1>: Options. (line 144)
-* system: Files. (line 153)
+* system <1>: Options. (line 151)
+* system: Files. (line 157)
* syzygy: syzygy. (line 6)
* tab: Files. (line 59)
* tab completion: Tutorial. (line 21)
@@ -9251,22 +9294,22 @@ Index
(line 6)
* tanh: Mathematical functions.
(line 6)
-* target: three. (line 315)
-* tell: Files. (line 86)
+* target: three. (line 317)
+* tell: Files. (line 90)
* tension <1>: three. (line 6)
* tension: Tutorial. (line 165)
* tensionSpecifier: Paths and guides. (line 381)
* tensor product shading: fill. (line 74)
* tensorshade: fill. (line 74)
-* tex <1>: Options. (line 128)
+* tex <1>: Options. (line 135)
* tex: Frames and pictures. (line 274)
* TeX fonts: Pens. (line 197)
* TeX string: Data types. (line 179)
-* texcommand: Configuring. (line 69)
+* texcommand: Configuring. (line 71)
* TeXHead: draw. (line 26)
-* TeXHead3: three. (line 494)
+* TeXHead3: three. (line 496)
* texpath <1>: label. (line 116)
-* texpath: Configuring. (line 69)
+* texpath: Configuring. (line 71)
* texpreamble: Frames and pictures. (line 282)
* texreset: Frames and pictures. (line 285)
* textbook graph: graph. (line 361)
@@ -9285,12 +9328,12 @@ Index
* time: Data types. (line 291)
* times: Paths and guides. (line 202)
* Top: graph. (line 131)
-* TopView: three. (line 358)
+* TopView: three. (line 360)
* trace: Debugger. (line 51)
* trailingzero: graph. (line 169)
-* transform <1>: three. (line 425)
+* transform <1>: three. (line 427)
* transform: Transforms. (line 6)
-* transform3: three. (line 394)
+* transform3: three. (line 396)
* transparency: Pens. (line 218)
* transpose: Arrays. (line 211)
* tree: tree. (line 9)
@@ -9302,7 +9345,7 @@ Index
(line 48)
* triple: Data types. (line 108)
* TrueMargin: draw. (line 42)
-* TrueMargin3: three. (line 510)
+* TrueMargin3: three. (line 512)
* tube <1>: tube. (line 6)
* tube: three. (line 104)
* tutorial: Tutorial. (line 6)
@@ -9316,9 +9359,9 @@ Index
* uniform: Arrays. (line 158)
* Uninstall: Uninstall. (line 6)
* unit: Data types. (line 78)
-* unitbox <1>: three. (line 284)
+* unitbox <1>: three. (line 286)
* unitbox: Tutorial. (line 218)
-* unitcircle <1>: three. (line 251)
+* unitcircle <1>: three. (line 253)
* unitcircle: Tutorial. (line 110)
* unitrand: Mathematical functions.
(line 39)
@@ -9328,7 +9371,7 @@ Index
(line 6)
* unpacking: Rest arguments. (line 39)
* unravel: Import. (line 31)
-* up: three. (line 315)
+* up: three. (line 317)
* update: Files. (line 36)
* UpsideDown: Frames and pictures. (line 95)
* usepackage: Frames and pictures. (line 287)
@@ -9345,10 +9388,10 @@ Index
* vertex-dependent colors: three. (line 75)
* Vertical: flowchart. (line 74)
* viewportheight: LaTeX usage. (line 32)
-* viewportmargin: three. (line 243)
-* viewportsize: three. (line 243)
+* viewportmargin: three. (line 245)
+* viewportsize: three. (line 245)
* viewportwidth: LaTeX usage. (line 32)
-* views: three. (line 212)
+* views: three. (line 214)
* vim: Editing modes. (line 33)
* virtual functions: Structures. (line 189)
* void: Data types. (line 10)
@@ -9363,10 +9406,10 @@ Index
* word: Arrays. (line 353)
* write <1>: Arrays. (line 394)
* write: Files. (line 51)
-* X: three. (line 251)
+* X: three. (line 253)
* xasy: GUI. (line 6)
* xaxis3: graph3. (line 7)
-* xelatex <1>: Options. (line 128)
+* xelatex <1>: Options. (line 135)
* xelatex: embed. (line 10)
* xequals: graph. (line 284)
* XEquals: graph. (line 270)
@@ -9377,14 +9420,14 @@ Index
* xoutput: Files. (line 71)
* xpart: Data types. (line 89)
* xscale: Transforms. (line 33)
-* xscale3: three. (line 401)
+* xscale3: three. (line 403)
* xtick: graph. (line 332)
* XYEquals: graph3. (line 20)
* XYZero: graph3. (line 20)
* XZEquals: graph3. (line 20)
* XZero: graph. (line 265)
* XZZero: graph3. (line 20)
-* Y <1>: three. (line 251)
+* Y <1>: three. (line 253)
* Y: Mathematical functions.
(line 6)
* yaxis3: graph3. (line 7)
@@ -9393,12 +9436,12 @@ Index
* ylimits: graph. (line 626)
* ypart: Data types. (line 92)
* yscale: Transforms. (line 36)
-* yscale3: three. (line 404)
+* yscale3: three. (line 406)
* ytick: graph. (line 332)
* YZEquals: graph3. (line 20)
* YZero: graph. (line 119)
* YZZero: graph3. (line 20)
-* Z: three. (line 251)
+* Z: three. (line 253)
* zaxis3: graph3. (line 7)
* zero_Ai: Mathematical functions.
(line 48)
@@ -9414,7 +9457,7 @@ Index
* zeta: Mathematical functions.
(line 48)
* zpart: Data types. (line 161)
-* zscale3: three. (line 407)
+* zscale3: three. (line 409)
* |: Arithmetic & logical.
(line 62)
* ||: Arithmetic & logical.
@@ -9429,139 +9472,140 @@ Node: Installation10259
Node: UNIX binary distributions11307
Node: MacOS X binary distributions12413
Node: Microsoft Windows13361
-Node: Configuring14531
-Node: Search paths18553
-Node: Compiling from UNIX source19233
-Ref: multisampling19822
-Node: Editing modes22240
-Node: Subversion24672
-Node: Uninstall25135
-Node: Tutorial25485
-Ref: unitcircle29228
-Ref: Bezier29437
-Node: Drawing commands34496
-Node: draw36205
-Ref: arrows37353
-Node: fill42578
-Ref: gradient shading43622
-Node: clip47815
-Node: label48407
-Ref: Label49106
-Node: Programming54850
-Ref: array iteration55667
-Node: Data types56749
-Ref: format65646
-Node: Paths and guides69110
-Ref: circle69364
-Ref: arctime74709
-Ref: extension78574
-Node: Pens85257
-Ref: fillrule92402
-Ref: basealign93299
-Ref: transparency96124
-Ref: makepen99567
-Ref: overwrite100405
-Node: Transforms101615
-Node: Frames and pictures103406
-Ref: envelope104547
-Ref: size105630
-Ref: unitsize106617
-Ref: shipout107677
-Ref: filltype109985
-Ref: add112968
-Ref: add about113914
-Ref: tex116859
-Node: Files117733
-Ref: cd118698
-Ref: scroll123079
-Node: Variable initializers126122
-Node: Structures128417
-Node: Operators135869
-Node: Arithmetic & logical136183
-Node: Self & prefix operators138080
-Node: User-defined operators138868
-Node: Implicit scaling139779
-Node: Functions140342
-Ref: stack overflow143095
-Node: Default arguments143659
-Node: Named arguments144398
-Node: Rest arguments146560
-Node: Mathematical functions149370
-Node: Arrays153975
-Ref: sort161156
-Ref: tridiagonal163447
-Ref: solve164675
-Node: Slices168802
-Node: Casts172696
-Node: Import174662
-Node: Static179892
-Node: LaTeX usage182788
-Node: Base modules188229
-Node: plain190729
-Node: simplex191381
-Node: math191654
-Node: interpolate192753
-Node: geometry193032
-Node: trembling193636
-Node: stats193997
-Node: patterns194257
-Node: markers194493
-Node: tree196276
-Node: binarytree196464
-Node: drawtree197053
-Node: syzygy197257
-Node: feynman197531
-Node: roundedpath197806
-Node: animation198089
-Ref: animate198508
-Node: embed199647
-Node: slide201436
-Node: MetaPost201776
-Node: unicode202492
-Node: latin1203380
-Node: babel203748
-Node: labelpath203977
-Node: labelpath3204797
-Node: annotate205108
-Node: CAD205579
-Node: graph205889
-Ref: ticks212727
-Ref: pathmarkers225875
-Ref: marker226340
-Ref: markuniform226691
-Ref: errorbars228482
-Ref: automatic scaling232538
-Node: palette243181
-Ref: images243299
-Ref: image247470
-Ref: logimage247948
-Ref: penimage248754
-Node: three249198
-Ref: PostScript3D271212
-Node: obj272904
-Node: graph3273156
-Ref: GaussianSurface278117
-Node: grid3279202
-Node: solids279942
-Node: tube280890
-Node: flowchart283121
-Node: contour287620
-Node: contour3292649
-Node: slopefield292956
-Node: ode294393
-Node: Options294653
-Ref: configuration file299815
-Ref: settings299815
-Ref: convert300886
-Node: Interactive mode303645
-Ref: history305269
-Node: GUI306574
-Node: GUI Installation307077
-Node: GUI Usage308551
-Node: PostScript to Asymptote309454
-Node: Help310597
-Node: Debugger312326
-Node: Credits314111
-Node: Index315024
+Ref: psview14071
+Node: Configuring15002
+Node: Search paths19286
+Node: Compiling from UNIX source19966
+Ref: multisampling20555
+Node: Editing modes22973
+Node: Subversion25405
+Node: Uninstall25868
+Node: Tutorial26218
+Ref: unitcircle29961
+Ref: Bezier30170
+Node: Drawing commands35229
+Node: draw36938
+Ref: arrows38086
+Node: fill43311
+Ref: gradient shading44355
+Node: clip48548
+Node: label49140
+Ref: Label49839
+Node: Programming55583
+Ref: array iteration56400
+Node: Data types57482
+Ref: format66379
+Node: Paths and guides69843
+Ref: circle70097
+Ref: arctime75442
+Ref: extension79307
+Node: Pens85990
+Ref: fillrule93135
+Ref: basealign94032
+Ref: transparency96857
+Ref: makepen100300
+Ref: overwrite101138
+Node: Transforms102348
+Node: Frames and pictures104139
+Ref: envelope105280
+Ref: size106363
+Ref: unitsize107350
+Ref: shipout108410
+Ref: filltype110718
+Ref: add113701
+Ref: add about114647
+Ref: tex117592
+Node: Files118466
+Ref: cd119431
+Ref: scroll123990
+Node: Variable initializers127033
+Node: Structures129328
+Node: Operators136780
+Node: Arithmetic & logical137094
+Node: Self & prefix operators138991
+Node: User-defined operators139779
+Node: Implicit scaling140690
+Node: Functions141253
+Ref: stack overflow144006
+Node: Default arguments144570
+Node: Named arguments145309
+Node: Rest arguments147471
+Node: Mathematical functions150281
+Node: Arrays154886
+Ref: sort162067
+Ref: tridiagonal164358
+Ref: solve165586
+Node: Slices169989
+Node: Casts173883
+Node: Import175849
+Node: Static181079
+Node: LaTeX usage183975
+Node: Base modules189416
+Node: plain191916
+Node: simplex192568
+Node: math192841
+Node: interpolate193940
+Node: geometry194219
+Node: trembling194823
+Node: stats195184
+Node: patterns195444
+Node: markers195680
+Node: tree197463
+Node: binarytree197651
+Node: drawtree198240
+Node: syzygy198444
+Node: feynman198718
+Node: roundedpath198993
+Node: animation199276
+Ref: animate199695
+Node: embed200834
+Node: slide202623
+Node: MetaPost202963
+Node: unicode203679
+Node: latin1204567
+Node: babel204935
+Node: labelpath205164
+Node: labelpath3205984
+Node: annotate206295
+Node: CAD206766
+Node: graph207076
+Ref: ticks213914
+Ref: pathmarkers227062
+Ref: marker227527
+Ref: markuniform227878
+Ref: errorbars229669
+Ref: automatic scaling233725
+Node: palette244368
+Ref: images244486
+Ref: image248657
+Ref: logimage249135
+Ref: penimage249941
+Node: three250385
+Ref: PostScript3D272548
+Node: obj274240
+Node: graph3274492
+Ref: GaussianSurface279447
+Node: grid3280532
+Node: solids281272
+Node: tube282220
+Node: flowchart284451
+Node: contour288950
+Node: contour3293979
+Node: slopefield294286
+Node: ode295723
+Node: Options295983
+Ref: configuration file301477
+Ref: settings301477
+Ref: convert302548
+Node: Interactive mode305307
+Ref: history306931
+Node: GUI308236
+Node: GUI Installation308739
+Node: GUI Usage310213
+Node: PostScript to Asymptote311116
+Node: Help312259
+Node: Debugger313988
+Node: Credits315773
+Node: Index316686

End Tag Table
diff --git a/Build/source/utils/asymptote/errormsg.cc b/Build/source/utils/asymptote/errormsg.cc
index 3b7b3e9020d..b9b45ee0d2d 100644
--- a/Build/source/utils/asymptote/errormsg.cc
+++ b/Build/source/utils/asymptote/errormsg.cc
@@ -7,7 +7,6 @@
#include <cstdio>
#include <cstdlib>
-#include <cstdarg>
#include "errormsg.h"
@@ -70,6 +69,11 @@ void errorstream::warning(position pos)
anyWarnings = true;
}
+void errorstream::disable(string s)
+{
+ out << ": to ignore, use nowarn(\""+s+"\");";
+}
+
void errorstream::fatal(position pos)
{
message(pos,"abort: ");
diff --git a/Build/source/utils/asymptote/errormsg.h b/Build/source/utils/asymptote/errormsg.h
index 2b152445881..2a762680be9 100644
--- a/Build/source/utils/asymptote/errormsg.h
+++ b/Build/source/utils/asymptote/errormsg.h
@@ -155,6 +155,9 @@ public:
// Indicate potential problems in the code, but the code is still usable.
void warning(position pos);
+
+ // Indicate how a warning may be disabled.
+ void disable(string s);
// Single a fatal error and execute the main process.
void fatal(position pos);
diff --git a/Build/source/utils/asymptote/examples/filesurface.asy b/Build/source/utils/asymptote/examples/filesurface.asy
index 42275715a0b..8e59c201f5e 100644
--- a/Build/source/utils/asymptote/examples/filesurface.asy
+++ b/Build/source/utils/asymptote/examples/filesurface.asy
@@ -29,6 +29,6 @@ triple target=0.5*(m+M);
currentprojection=perspective(camera=target+realmult(dir(68,225),M-m),
target=target);
-xaxis3("$x$",Bounds(),InTicks);
-yaxis3("$y$",Bounds(),InTicks(Step=1,step=0.1));
-zaxis3("$z$",Bounds(),InTicks);
+xaxis3("$x$",Bounds,InTicks);
+yaxis3("$y$",Bounds,InTicks(Step=1,step=0.1));
+zaxis3("$z$",Bounds,InTicks);
diff --git a/Build/source/utils/asymptote/fftw++.h b/Build/source/utils/asymptote/fftw++.h
index e3cb3d2b2f2..62f8281e278 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.03
+#define __FFTWPP_H_VERSION__ 1.04
#include <cstdlib>
#include <fstream>
@@ -78,13 +78,13 @@ inline void FFTWdelete(T *p)
fftw_free(alloc);
}
-inline void fftw_export_wisdom(void (*emitter)(char c, std::ofstream& s),
+inline void fftwpp_export_wisdom(void (*emitter)(char c, std::ofstream& s),
std::ofstream& s)
{
fftw_export_wisdom((void (*) (char, void *)) emitter,(void *) &s);
}
-inline int fftw_import_wisdom(int (*g)(std::ifstream& s), std::ifstream &s)
+inline int fftwpp_import_wisdom(int (*g)(std::ifstream& s), std::ifstream &s)
{
return fftw_import_wisdom((int (*) (void *)) g,(void *) &s);
}
@@ -101,8 +101,8 @@ protected:
double norm;
bool shift;
- bool inplace;
fftw_plan plan;
+ bool inplace;
static unsigned int effort;
static bool Wise;
@@ -154,9 +154,10 @@ protected:
public:
fftw(unsigned int size, int sign, unsigned int n=0) :
- size(size), sign(sign), norm(1.0/(n ? n : size)), shift(false) {}
+ size(size), sign(sign), norm(1.0/(n ? n : size)), shift(false), plan(NULL)
+ {}
- virtual ~fftw() {}
+ virtual ~fftw() {if(plan) fftw_destroy_plan(plan);}
virtual fftw_plan Plan(Complex *in, Complex *out)=0;
@@ -193,14 +194,14 @@ public:
void LoadWisdom() {
ifWisdom.open(WisdomName);
- fftw_import_wisdom(GetWisdom,ifWisdom);
+ fftwpp_import_wisdom(GetWisdom,ifWisdom);
ifWisdom.close();
Wise=true;
}
void SaveWisdom() {
ofWisdom.open(WisdomName);
- fftw_export_wisdom(PutWisdom,ofWisdom);
+ fftwpp_export_wisdom(PutWisdom,ofWisdom);
ofWisdom.close();
}
diff --git a/Build/source/utils/asymptote/fileio.cc b/Build/source/utils/asymptote/fileio.cc
index 125326af5eb..3aeb4cbe548 100644
--- a/Build/source/utils/asymptote/fileio.cc
+++ b/Build/source/utils/asymptote/fileio.cc
@@ -14,7 +14,7 @@ string tab="\t";
string newline="\n";
ofile Stdout("");
-file nullfile("",false,false,true);
+file nullfile("",false,NOMODE,false,true);
void ifile::ignoreComment()
{
diff --git a/Build/source/utils/asymptote/fileio.h b/Build/source/utils/asymptote/fileio.h
index e67d7e96b74..f7757b17437 100644
--- a/Build/source/utils/asymptote/fileio.h
+++ b/Build/source/utils/asymptote/fileio.h
@@ -38,23 +38,36 @@ namespace camp {
extern string tab;
extern string newline;
+enum Mode {NOMODE,INPUT,OUTPUT,UPDATE,BINPUT,BOUTPUT,BUPDATE,XINPUT,XOUTPUT,
+ XUPDATE};
+
+static const string FileModes[]={"none",
+ "input","output","ouptut(update=false)",
+ "binput","boutput","boutput(update=false)",
+ "xinput","xoutput","xoutput(update=false)"};
+
class file : public gc {
protected:
string name;
+ bool check; // Check whether input file exists.
+ Mode type;
+
Int nx,ny,nz; // Array dimensions
bool linemode; // Array reads will stop at eol instead of eof.
bool csvmode; // Read comma-separated values.
bool wordmode; // Delimit strings by white space instead of eol.
bool singlereal; // Read/write single-precision XDR/binary reals.
bool singleint; // Read/write single-precision XDR/binary ints.
+ bool signedint; // Read/write signed XDR/binary ints.
+
bool closed; // File has been closed.
- bool check; // Check whether input file exists.
bool standard; // Standard input/output
bool binary; // Read in binary mode.
bool nullfield; // Used to detect a final null field in csv+line mode.
string whitespace;
size_t index; // Terminator index.
+
public:
bool Standard() {return standard;}
@@ -88,11 +101,11 @@ public:
void dimension(Int Nx=-1, Int Ny=-1, Int Nz=-1) {nx=Nx; ny=Ny; nz=Nz;}
- file(const string& name, bool check=true, bool binary=false,
+ file(const string& name, bool check=true, Mode type=NOMODE, bool binary=false,
bool closed=false) :
- name(name), linemode(false), csvmode(false),
- singlereal(false), singleint(true),
- closed(closed), check(check), standard(name.empty()),
+ name(name), check(check), type(type), linemode(false), csvmode(false),
+ singlereal(false), singleint(true), signedint(true),
+ closed(closed), standard(name.empty()),
binary(binary), nullfield(false), whitespace("") {dimension();}
virtual void open() {}
@@ -107,8 +120,6 @@ public:
virtual ~file() {}
- virtual const char* Mode() {return "";}
-
bool isOpen() {
if(closed) {
ostringstream buf;
@@ -133,9 +144,11 @@ public:
virtual size_t tell() {return 0;}
virtual void seek(Int, bool=true) {}
+ string FileMode() {return FileModes[type];}
+
void unsupported(const char *rw, const char *type) {
ostringstream buf;
- buf << rw << " of type " << type << " not supported in " << Mode()
+ buf << rw << " of type " << type << " not supported in " << FileMode()
<< " mode.";
reportError(buf);
}
@@ -214,6 +227,9 @@ public:
void SingleInt(bool b) {singleint=b;}
bool SingleInt() {return singleint;}
+
+ void SignedInt(bool b) {signedint=b;}
+ bool SignedInt() {return signedint;}
};
class ifile : public file {
@@ -225,16 +241,15 @@ protected:
bool comma;
public:
- ifile(const string& name, char comment, bool check=true,
+ ifile(const string& name, char comment, bool check=true, Mode type=INPUT,
std::ios::openmode mode=std::ios::in) :
- file(name,check), stream(&cin), fstream(NULL), comment(comment), mode(mode),
- comma(false) {
- }
+ file(name,check,type), stream(&cin), fstream(NULL), comment(comment),
+ mode(mode), comma(false) {}
// Binary file
- ifile(const string& name, bool check=true,
+ ifile(const string& name, bool check=true, Mode type=BINPUT,
std::ios::openmode mode=std::ios::in) :
- file(name,check,true), mode(mode) {}
+ file(name,check,type,true), mode(mode) {}
~ifile() {close();}
@@ -259,8 +274,6 @@ public:
}
}
- const char* Mode() {return "input";}
-
bool eol();
bool nexteol();
@@ -313,7 +326,7 @@ public:
class iofile : public ifile {
public:
iofile(const string& name, char comment=0) :
- ifile(name,true,comment,std::ios::in | std::ios::out) {}
+ ifile(name,comment,true,UPDATE,std::ios::in | std::ios::out) {}
Int precision(Int p) {
return p == 0 ? stream->precision() : stream->precision(p);
@@ -342,9 +355,9 @@ protected:
std::ofstream *fstream;
std::ios::openmode mode;
public:
- ofile(const string& name, std::ios::openmode mode=std::ios::trunc) :
- file(name), stream(&cout), fstream(NULL), mode(mode) {
- }
+ ofile(const string& name, Mode type=OUTPUT,
+ std::ios::openmode mode=std::ios::trunc) :
+ file(name,true,type), stream(&cout), fstream(NULL), mode(mode) {}
~ofile() {close();}
@@ -361,8 +374,6 @@ public:
}
}
- const char* Mode() {return "output";}
-
bool text() {return true;}
bool eof() {return stream->eof();}
bool error() {return stream->fail();}
@@ -411,9 +422,9 @@ public:
class ibfile : public ifile {
public:
- ibfile(const string& name, bool check=true,
+ ibfile(const string& name, bool check=true, Mode type=BINPUT,
std::ios::openmode mode=std::ios::in) :
- ifile(name,check,mode | std::ios::binary) {}
+ ifile(name,check,type,mode | std::ios::binary) {}
template<class T>
void iread(T& val) {
val=T();
@@ -422,8 +433,13 @@ public:
void Read(bool& val) {iread(val);}
void Read(Int& val) {
- if(singleint) {int ival; iread(ival); val=ival;}
- else iread(val);
+ if(signedint) {
+ if(singleint) {int ival; iread(ival); val=ival;}
+ else iread(val);
+ } else {
+ if(singleint) {unsigned ival; iread(ival); val=Intcast(ival);}
+ else {unsignedInt ival; iread(ival); val=Intcast(ival);}
+ }
}
void Read(char& val) {iread(val);}
void Read(string& val) {iread(val);}
@@ -436,8 +452,8 @@ public:
class iobfile : public ibfile {
public:
- iobfile(const string& name) : ibfile(name,true,std::ios::in | std::ios::out)
- {}
+ iobfile(const string& name) :
+ ibfile(name,true,BUPDATE,std::ios::in | std::ios::out) {}
void flush() {if(fstream) fstream->flush();}
@@ -448,8 +464,13 @@ public:
void write(bool val) {iwrite(val);}
void write(Int val) {
- if(singleint) iwrite(intcast(val));
- else iwrite(val);
+ if(signedint) {
+ if(singleint) iwrite(intcast(val));
+ else iwrite(val);
+ } else {
+ if(singleint) iwrite(unsignedcast(val));
+ else iwrite(unsignedIntcast(val));
+ }
}
void write(const string& val) {iwrite(val);}
void write(const pen& val) {iwrite(val);}
@@ -473,7 +494,7 @@ public:
class obfile : public ofile {
public:
- obfile(const string& name) : ofile(name,std::ios::binary) {}
+ obfile(const string& name) : ofile(name,BOUTPUT,std::ios::binary) {}
template<class T>
void iwrite(T val) {
@@ -482,8 +503,13 @@ public:
void write(bool val) {iwrite(val);}
void write(Int val) {
- if(singleint) iwrite(intcast(val));
- else iwrite(val);
+ if(signedint) {
+ if(singleint) iwrite(intcast(val));
+ else iwrite(val);
+ } else {
+ if(singleint) iwrite(unsignedcast(val));
+ else iwrite(unsignedIntcast(val));
+ }
}
void write(const string& val) {iwrite(val);}
void write(const pen& val) {iwrite(val);}
@@ -513,9 +539,9 @@ protected:
xdr::ioxstream *fstream;
xdr::xios::open_mode mode;
public:
- ixfile(const string& name, bool check=true,
+ ixfile(const string& name, bool check=true, Mode type=XINPUT,
xdr::xios::open_mode mode=xdr::xios::in) :
- file(name,check,true), fstream(NULL), mode(mode) {}
+ file(name,check,type,true), fstream(NULL), mode(mode) {}
void open() {
fstream=new xdr::ioxstream(name.c_str(),mode);
@@ -535,8 +561,6 @@ public:
~ixfile() {close();}
- const char* Mode() {return "xinput";}
-
bool eof() {return fstream ? fstream->eof() : true;}
bool error() {return fstream ? fstream->fail() : true;}
@@ -557,10 +581,12 @@ public:
}
void Read(Int& val) {
- if(singleint) {int ival=0; *fstream >> ival; val=ival;}
- else {
- val=0;
- *fstream >> val;
+ if(signedint) {
+ if(singleint) {int ival=0; *fstream >> ival; val=ival;}
+ else {val=0; *fstream >> val;}
+ } else {
+ if(singleint) {unsigned ival=0; *fstream >> ival; val=Intcast(ival);}
+ else {unsignedInt ival=0; *fstream >> ival; val=Intcast(ival);}
}
}
void Read(double& val) {
@@ -587,13 +613,18 @@ public:
class ioxfile : public ixfile {
public:
- ioxfile(const string& name) : ixfile(name,true,xdr::xios::out) {}
+ ioxfile(const string& name) : ixfile(name,true,XUPDATE,xdr::xios::out) {}
void flush() {if(fstream) fstream->flush();}
void write(Int val) {
- if(singleint) *fstream << intcast(val);
- else *fstream << val;
+ if(signedint) {
+ if(singleint) *fstream << intcast(val);
+ else *fstream << val;
+ } else {
+ if(singleint) *fstream << unsignedcast(val);
+ else *fstream << unsignedIntcast(val);
+ }
}
void write(double val) {
if(singlereal) *fstream << (float) val;
@@ -613,7 +644,7 @@ public:
class oxfile : public file {
xdr::oxstream *fstream;
public:
- oxfile(const string& name) : file(name), fstream(NULL) {}
+ oxfile(const string& name) : file(name,true,XOUTPUT), fstream(NULL) {}
void open() {
fstream=new xdr::oxstream((checkLocal(name),name.c_str()),xdr::xios::trunc);
@@ -633,8 +664,6 @@ public:
~oxfile() {close();}
- const char* Mode() {return "xoutput";}
-
bool eof() {return fstream ? fstream->eof() : true;}
bool error() {return fstream ? fstream->fail() : true;}
void clear() {if(fstream) fstream->clear();}
@@ -655,8 +684,13 @@ public:
}
void write(Int val) {
- if(singleint) *fstream << intcast(val);
- else *fstream << val;
+ if(signedint) {
+ if(singleint) *fstream << intcast(val);
+ else *fstream << val;
+ } else {
+ if(singleint) *fstream << unsignedcast(val);
+ else *fstream << unsignedIntcast(val);
+ }
}
void write(double val) {
if(singlereal) *fstream << (float) val;
diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc
index 38389284c78..ebb446c28da 100644
--- a/Build/source/utils/asymptote/glrender.cc
+++ b/Build/source/utils/asymptote/glrender.cc
@@ -53,12 +53,16 @@ using camp::bbox3;
using settings::getSetting;
using settings::Setting;
-const double moveFactor=1.0;
-const double zoomFactor=1.05;
-const double zoomFactorStep=0.1;
-const double spinStep=60.0; // Degrees per second
-const double arcballRadius=750.0;
-const double resizeStep=1.2;
+// For now, don't use POSIX timers by default due to portability issues.
+#ifdef HAVE_POSIX_TIMERS
+static timer_t timerid;
+static struct itimerspec Timeout;
+#else
+static struct itimerval Timeout;
+#endif
+
+static const double milliseconds=1000.0; // In microseconds.
+timeval lasttime;
double Aspect;
bool View;
@@ -120,7 +124,7 @@ bool antialias;
int x0,y0;
string Action;
-int MenuButton=0;
+int MenuButton;
double lastangle;
@@ -258,6 +262,7 @@ void setProjection()
else
glFrustum(xmin,xmax,ymin,ymax,-zmax,-zmin);
glMatrixMode(GL_MODELVIEW);
+ double arcballRadius=getSetting<double>("arcballradius");
arcball.set_params(vec2(0.5*Width,0.5*Height),arcballRadius*Zoom);
}
@@ -495,7 +500,6 @@ void togglefitscreen()
void updateHandler(int)
{
- initlighting();
update();
glutShowWindow();
glutShowWindow(); // Call twice to work around apparent freeglut bug.
@@ -529,11 +533,41 @@ void reshape(int width, int height)
reshape0(width,height);
}
+void initTimer()
+{
+ gettimeofday(&lasttime,NULL);
+}
+
+void idleFunc(void (*f)())
+{
+ initTimer();
+ glutIdleFunc(f);
+}
+
+void idle()
+{
+ glutIdleFunc(NULL);
+ Xspin=Yspin=Zspin=false;
+}
+
+void home()
+{
+ idle();
+ X=Y=cx=cy=0.0;
+ arcball.init();
+ glLoadIdentity();
+ glGetFloatv(GL_MODELVIEW_MATRIX,Rotate);
+ lastzoom=Zoom=Zoom0;
+ setDimensions(Width,Height,0,0);
+ initlighting();
+}
+
void quit()
{
if(glthread) {
+ home();
glutHideWindow();
-#ifdef HAVE_LIBPTHREAD
+ #ifdef HAVE_LIBPTHREAD
if(!interact::interactive)
endwait(readySignal,readyLock);
#endif
@@ -597,9 +631,8 @@ void capzoom()
void disableMenu()
{
- if(MenuButton)
- glutDetachMenu(MenuButton);
Menu=false;
+ glutDetachMenu(MenuButton);
}
void zoom(int x, int y)
@@ -612,30 +645,37 @@ void zoom(int x, int y)
return;
}
Motion=true;
- static const double limit=log(0.1*DBL_MAX)/log(zoomFactor);
- lastzoom=Zoom;
- double s=zoomFactorStep*(y0-y);
- if(fabs(s) < limit) {
- Zoom *= pow(zoomFactor,s);
- capzoom();
- y0=y;
- setProjection();
- glutPostRedisplay();
+ double zoomFactor=getSetting<double>("zoomfactor");
+ if(zoomFactor > 0.0) {
+ double zoomStep=getSetting<double>("zoomstep");
+ const double limit=log(0.1*DBL_MAX)/log(zoomFactor);
+ lastzoom=Zoom;
+ double s=zoomStep*(y0-y);
+ if(fabs(s) < limit) {
+ Zoom *= pow(zoomFactor,s);
+ capzoom();
+ y0=y;
+ setProjection();
+ glutPostRedisplay();
+ }
}
}
}
void mousewheel(int wheel, int direction, int x, int y)
{
- lastzoom=Zoom;
- if(direction > 0)
- Zoom *= zoomFactor;
- else
- Zoom /= zoomFactor;
-
- capzoom();
- setProjection();
- glutPostRedisplay();
+ double zoomFactor=getSetting<double>("zoomfactor");
+ if(zoomFactor > 0.0) {
+ lastzoom=Zoom;
+ if(direction > 0)
+ Zoom *= zoomFactor;
+ else
+ Zoom /= zoomFactor;
+
+ capzoom();
+ setProjection();
+ glutPostRedisplay();
+ }
}
void rotate(int x, int y)
@@ -677,7 +717,7 @@ void updateArcball()
}
update();
}
-
+
void rotateX(double step)
{
glLoadIdentity();
@@ -786,9 +826,45 @@ string action(int button, int mod)
return "";
}
+void timeout(int)
+{
+ if(Menu) disableMenu();
+}
+
+void init_timeout()
+{
+ static struct sigaction action;
+ action.sa_handler=timeout;
+ sigemptyset(&action.sa_mask);
+ action.sa_flags=0;
+ sigaction(SIGALRM,&action,NULL);
+
+ Timeout.it_value.tv_sec=Timeout.it_interval.tv_sec=0;
+#ifdef HAVE_POSIX_TIMERS
+ timer_create (CLOCK_REALTIME,NULL,&timerid);
+ Timeout.it_interval.tv_nsec=0;
+#else
+ Timeout.it_interval.tv_usec=0;
+#endif
+}
+
+void set_timeout(int microseconds)
+{
+ if(microseconds >= 0) {
+#ifdef HAVE_POSIX_TIMERS
+ Timeout.it_value.tv_nsec=1000*microseconds;
+ timer_settime(timerid,0,&Timeout,NULL);
+#else
+ Timeout.it_value.tv_usec=microseconds;
+ setitimer(ITIMER_REAL,&Timeout,NULL);
+#endif
+ }
+}
+
void mouse(int button, int state, int x, int y)
{
- string Action=action(button,glutGetModifiers());
+ int mod=glutGetModifiers();
+ string Action=action(button,mod);
if(Action == "zoomin") {
glutMotionFunc(NULL);
@@ -801,12 +877,13 @@ void mouse(int button, int state, int x, int y)
return;
}
- if(Action == "zoom/menu") {
+ if(Action == "zoom/menu" && mod == 0) {
if(state == GLUT_UP && !Motion) {
MenuButton=button;
glutMotionFunc(NULL);
glutAttachMenu(button);
Menu=true;
+ set_timeout((int) (getSetting<double>("doubleclick")*milliseconds));
return;
}
}
@@ -837,14 +914,13 @@ void mouse(int button, int state, int x, int y)
}
}
-timeval lasttime;
-
double spinstep()
{
timeval tv;
gettimeofday(&tv,NULL);
- double step=spinStep*(tv.tv_sec-lasttime.tv_sec+
- ((double) tv.tv_usec-lasttime.tv_usec)/1000000.0);
+ double step=getSetting<double>("spinstep")*
+ (tv.tv_sec-lasttime.tv_sec+
+ ((double) tv.tv_usec-lasttime.tv_usec)/1000000.0);
lasttime=tv;
return step;
}
@@ -864,26 +940,19 @@ void zspin()
rotateZ(spinstep());
}
-void initTimer()
-{
- gettimeofday(&lasttime,NULL);
-}
-
void expand()
{
- setsize((int) (Width*resizeStep+0.5),(int) (Height*resizeStep+0.5));
+ double resizeStep=getSetting<double>("resizestep");
+ if(resizeStep > 0.0)
+ setsize((int) (Width*resizeStep+0.5),(int) (Height*resizeStep+0.5));
}
void shrink()
{
- setsize(max((int) (Width/resizeStep+0.5),1),
- max((int) (Height/resizeStep+0.5),1));
-}
-
-void idleFunc(void (*f)())
-{
- initTimer();
- glutIdleFunc(f);
+ double resizeStep=getSetting<double>("resizestep");
+ if(resizeStep > 0.0)
+ setsize(max((int) (Width/resizeStep+0.5),1),
+ max((int) (Height/resizeStep+0.5),1));
}
void mode()
@@ -911,12 +980,6 @@ void mode()
glutPostRedisplay();
}
-void idle()
-{
- glutIdleFunc(NULL);
- Xspin=Yspin=Zspin=false;
-}
-
void spinx()
{
if(Xspin)
@@ -950,17 +1013,6 @@ void spinz()
}
}
-void home()
-{
- idle();
- X=Y=cx=cy=0.0;
- arcball.init();
- glLoadIdentity();
- glGetFloatv(GL_MODELVIEW_MATRIX,Rotate);
- lastzoom=Zoom=Zoom0;
- setDimensions(Width,Height,0,0);
-}
-
void write(const char *text, const double *v)
{
cout << text << "=(" << v[0] << "," << v[1] << "," << v[2] << ")";
@@ -998,7 +1050,8 @@ void camera()
pair viewportshift(X/Width*lastzoom+Shift.getx(),
Y/Height*lastzoom+Shift.gety());
- cout << "currentprojection="
+ cout << endl
+ << "currentprojection="
<< (orthographic ? "orthographic(" : "perspective(") << endl
<< "camera=" << Camera << "," << endl
<< "up=" << Up << "," << endl
@@ -1011,7 +1064,7 @@ void camera()
cout << "," << endl << "viewportshift=" << viewportshift;
if(!orthographic)
cout << "," << endl << "autoadjust=false";
- cout << ");" << endl << endl;
+ cout << ");" << endl;
}
void keyboard(unsigned char key, int x, int y)
@@ -1067,7 +1120,8 @@ enum Menu {HOME,FITSCREEN,XSPIN,YSPIN,ZSPIN,STOP,MODE,EXPORT,CAMERA,QUIT};
void menu(int choice)
{
- disableMenu();
+ set_timeout(0);
+ if(Menu) disableMenu();
ignorezoom=true;
Motion=true;
switch (choice) {
@@ -1126,6 +1180,7 @@ void init()
screenWidth=glutGet(GLUT_SCREEN_WIDTH);
screenHeight=glutGet(GLUT_SCREEN_HEIGHT);
+ init_timeout();
}
// angle=0 means orthographic.
@@ -1240,10 +1295,8 @@ void glrender(const string& prefix, const picture *pic, const string& format,
#ifdef HAVE_LIBPTHREAD
if(glthread && initializedView) {
- if(!View) {
+ if(!View)
readyAfterExport=queueExport=true;
- }
-
pthread_kill(mainthread,SIGUSR1);
return;
}
@@ -1284,16 +1337,16 @@ void glrender(const string& prefix, const picture *pic, const string& format,
string suffix;
for(size_t i=0; i < nbuttons; ++i) {
int button=buttons[i];
- if(action(button,0) == "menu") {
- suffix="Click "+buttonnames[i]+" button for menu";
+ if(action(button,0) == "zoom/menu") {
+ suffix="Double click "+buttonnames[i]+" button for menu";
break;
}
}
if(suffix.empty()) {
for(size_t i=0; i < nbuttons; ++i) {
int button=buttons[i];
- if(action(button,0) == "zoom/menu") {
- suffix="Double click "+buttonnames[i]+" button for menu";
+ if(action(button,0) == "menu") {
+ suffix="Click "+buttonnames[i]+" button for menu";
break;
}
}
@@ -1367,7 +1420,6 @@ void glrender(const string& prefix, const picture *pic, const string& format,
gluNurbsCallback(nurb,GLU_NURBS_COLOR,(_GLUfuncptr) glColor4fv);
mode();
- initlighting();
if(View) {
initializedView=true;
glutReshapeFunc(reshape);
diff --git a/Build/source/utils/asymptote/main.cc b/Build/source/utils/asymptote/main.cc
index ad8e6292e0c..0cd7a281d58 100644
--- a/Build/source/utils/asymptote/main.cc
+++ b/Build/source/utils/asymptote/main.cc
@@ -154,6 +154,12 @@ void *asymain(void *A)
int status;
while(wait(&status) > 0);
}
+#ifdef HAVE_LIBGL
+#ifdef HAVE_LIBPTHREAD
+ if(gl::glthread)
+ pthread_join(gl::mainthread,NULL);
+#endif
+#endif
exit(em.processStatus() || interact::interactive ? 0 : 1);
}
@@ -173,15 +179,13 @@ int main(int argc, char *argv[])
#ifdef HAVE_LIBPTHREAD
if(gl::glthread) {
- pthread_t thread;
try {
- if(pthread_create(&thread,NULL,asymain,&args) == 0) {
- gl::mainthread=pthread_self();
+ if(pthread_create(&gl::mainthread,NULL,asymain,&args) == 0) {
while(true) {
camp::glrenderWrapper();
gl::initialize=true;
}
- }
+ } else gl::glthread=false;
} catch(std::bad_alloc&) {
outOfMemory();
}
diff --git a/Build/source/utils/asymptote/runtime.cc b/Build/source/utils/asymptote/runtime.cc
index e2eca048701..4f36073bce7 100644
--- a/Build/source/utils/asymptote/runtime.cc
+++ b/Build/source/utils/asymptote/runtime.cc
@@ -126,7 +126,7 @@ typedef callable callableTransform;
using vm::array;
using types::function;
-#define PRIMITIVE(name,Name,asyName) using types::prim##Name;
+#define PRIMITIVE(name,Name,asyName) using types::prim##Name;
#include <primitives.h>
#undef PRIMITIVE
@@ -6272,45 +6272,63 @@ void gen411(stack *)
bplist.clear();
}
-// Strip directory from string
+#line 4397 "runtime.in"
+// void warn(string s);
+void gen412(stack *Stack)
+{
+ string s=vm::pop<string>(Stack);
#line 4398 "runtime.in"
+ Warn(s);
+}
+
+#line 4402 "runtime.in"
+// void nowarn(string s);
+void gen413(stack *Stack)
+{
+ string s=vm::pop<string>(Stack);
+#line 4403 "runtime.in"
+ noWarn(s);
+}
+
+// Strip directory from string
+#line 4408 "runtime.in"
// string stripdirectory(string *s);
-void gen412(stack *Stack)
+void gen414(stack *Stack)
{
string * s=vm::pop<string *>(Stack);
-#line 4399 "runtime.in"
+#line 4409 "runtime.in"
{Stack->push<string>(stripDir(*s)); return;}
}
// Strip directory from string
-#line 4404 "runtime.in"
+#line 4414 "runtime.in"
// string stripfile(string *s);
-void gen413(stack *Stack)
+void gen415(stack *Stack)
{
string * s=vm::pop<string *>(Stack);
-#line 4405 "runtime.in"
+#line 4415 "runtime.in"
{Stack->push<string>(stripFile(*s)); return;}
}
// Strip file extension from string
-#line 4410 "runtime.in"
+#line 4420 "runtime.in"
// string stripextension(string *s);
-void gen414(stack *Stack)
+void gen416(stack *Stack)
{
string * s=vm::pop<string *>(Stack);
-#line 4411 "runtime.in"
+#line 4421 "runtime.in"
{Stack->push<string>(stripExt(*s)); return;}
}
// Call ImageMagick convert.
-#line 4416 "runtime.in"
+#line 4426 "runtime.in"
// Int convert(string args=emptystring, string file=emptystring, string format=emptystring);
-void gen415(stack *Stack)
+void gen417(stack *Stack)
{
string format=vm::pop<string>(Stack,emptystring);
string file=vm::pop<string>(Stack,emptystring);
string args=vm::pop<string>(Stack,emptystring);
-#line 4418 "runtime.in"
+#line 4428 "runtime.in"
ostringstream cmd;
string name=convertname(file,format);
@@ -6326,14 +6344,14 @@ void gen415(stack *Stack)
}
// Call ImageMagick animate.
-#line 4434 "runtime.in"
+#line 4444 "runtime.in"
// Int animate(string args=emptystring, string file=emptystring, string format=emptystring);
-void gen416(stack *Stack)
+void gen418(stack *Stack)
{
string format=vm::pop<string>(Stack,emptystring);
string file=vm::pop<string>(Stack,emptystring);
string args=vm::pop<string>(Stack,emptystring);
-#line 4436 "runtime.in"
+#line 4446 "runtime.in"
#ifndef __CYGWIN__
string name=convertname(file,format,false);
if(view()) {
@@ -6347,12 +6365,12 @@ void gen416(stack *Stack)
}
// Delete file named s.
-#line 4450 "runtime.in"
+#line 4460 "runtime.in"
// Int delete(string *s);
-void gen417(stack *Stack)
+void gen419(stack *Stack)
{
string * s=vm::pop<string *>(Stack);
-#line 4451 "runtime.in"
+#line 4461 "runtime.in"
checkLocal(*s);
Int rc=unlink(s->c_str());
if(rc == 0 && verbose > 0)
@@ -6361,13 +6379,13 @@ void gen417(stack *Stack)
}
// Rename file "from" to file "to".
-#line 4460 "runtime.in"
+#line 4470 "runtime.in"
// Int rename(string *from, string *to);
-void gen418(stack *Stack)
+void gen420(stack *Stack)
{
string * to=vm::pop<string *>(Stack);
string * from=vm::pop<string *>(Stack);
-#line 4461 "runtime.in"
+#line 4471 "runtime.in"
checkLocal(*from);
checkLocal(*to);
Int rc=rename(from->c_str(),to->c_str());
@@ -6380,10 +6398,10 @@ void gen418(stack *Stack)
// Array operations
// Create an empty array.
-#line 4474 "runtime.in"
+#line 4484 "runtime.in"
void emptyArray(stack *Stack)
{
-#line 4475 "runtime.in"
+#line 4485 "runtime.in"
{Stack->push<array*>(new array(0)); return;}
}
@@ -6392,11 +6410,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 4484 "runtime.in"
+#line 4494 "runtime.in"
void newDeepArray(stack *Stack)
{
Int depth=vm::pop<Int>(Stack);
-#line 4485 "runtime.in"
+#line 4495 "runtime.in"
assert(depth > 0);
Int *dims = new Int[depth];
@@ -6415,11 +6433,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 4504 "runtime.in"
+#line 4514 "runtime.in"
void newInitializedArray(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 4505 "runtime.in"
+#line 4515 "runtime.in"
assert(n >= 0);
array *a = new array(n);
@@ -6432,12 +6450,12 @@ void newInitializedArray(stack *Stack)
// Similar to newInitializedArray, but after the n elements, append another
// array to it.
-#line 4518 "runtime.in"
+#line 4528 "runtime.in"
void newAppendedArray(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array* tail=vm::pop<array*>(Stack);
-#line 4519 "runtime.in"
+#line 4529 "runtime.in"
assert(n >= 0);
array *a = new array(n);
@@ -6452,13 +6470,13 @@ void newAppendedArray(stack *Stack)
// The function T[] array(int n, T value, int depth=0) produces a array of n
// copies of x, where each copy is copied up to depth.
-#line 4534 "runtime.in"
+#line 4544 "runtime.in"
void newDuplicateArray(stack *Stack)
{
Int depth=vm::pop<Int>(Stack,Int_MAX);
item value=vm::pop(Stack);
Int n=vm::pop<Int>(Stack);
-#line 4535 "runtime.in"
+#line 4545 "runtime.in"
if(n < 0) error("cannot create a negative length array");
if(depth < 0) error("cannot copy to a negative depth");
@@ -6466,12 +6484,12 @@ void newDuplicateArray(stack *Stack)
}
// Read an element from an array. Checks for initialization & bounds.
-#line 4543 "runtime.in"
+#line 4553 "runtime.in"
void arrayRead(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 4544 "runtime.in"
+#line 4554 "runtime.in"
item& i=arrayRead(a,n);
if (i.empty()) {
ostringstream buf;
@@ -6482,50 +6500,50 @@ void arrayRead(stack *Stack)
}
// Slice a substring from an array.
-#line 4555 "runtime.in"
+#line 4565 "runtime.in"
void arraySliceRead(stack *Stack)
{
Int right=vm::pop<Int>(Stack);
Int left=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 4556 "runtime.in"
+#line 4566 "runtime.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 4563 "runtime.in"
+#line 4573 "runtime.in"
void arraySliceReadToEnd(stack *Stack)
{
Int left=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 4564 "runtime.in"
+#line 4574 "runtime.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 4571 "runtime.in"
+#line 4581 "runtime.in"
void arrayArrayRead(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 4572 "runtime.in"
+#line 4582 "runtime.in"
item& i=arrayRead(a,n);
if (i.empty()) i=new array(0);
{Stack->push(i); return;}
}
// Write an element to an array. Increase size if necessary.
-#line 4579 "runtime.in"
+#line 4589 "runtime.in"
void arrayWrite(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
item value=vm::pop(Stack);
-#line 4580 "runtime.in"
+#line 4590 "runtime.in"
size_t len=checkArray(a);
bool cyclic=a->cyclic();
if(cyclic && len > 0) n=imod(n,len);
@@ -6539,27 +6557,27 @@ void arrayWrite(stack *Stack)
{Stack->push(value); return;}
}
-#line 4594 "runtime.in"
+#line 4604 "runtime.in"
void arraySliceWrite(stack *Stack)
{
Int right=vm::pop<Int>(Stack);
Int left=vm::pop<Int>(Stack);
array * dest=vm::pop<array *>(Stack);
array * src=vm::pop<array *>(Stack);
-#line 4595 "runtime.in"
+#line 4605 "runtime.in"
checkArray(src);
checkArray(dest);
dest->setSlice(left, right, src);
{Stack->push<array*>(src); return;}
}
-#line 4602 "runtime.in"
+#line 4612 "runtime.in"
void arraySliceWriteToEnd(stack *Stack)
{
Int left=vm::pop<Int>(Stack);
array * dest=vm::pop<array *>(Stack);
array * src=vm::pop<array *>(Stack);
-#line 4603 "runtime.in"
+#line 4613 "runtime.in"
checkArray(src);
size_t len=checkArray(dest);
dest->setSlice(left, (Int) len, src);
@@ -6567,20 +6585,20 @@ void arraySliceWriteToEnd(stack *Stack)
}
// Returns the length of an array.
-#line 4611 "runtime.in"
+#line 4621 "runtime.in"
void arrayLength(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4612 "runtime.in"
+#line 4622 "runtime.in"
{Stack->push<Int>((Int) checkArray(a)); return;}
}
// Returns an array of integers representing the keys of the array.
-#line 4617 "runtime.in"
+#line 4627 "runtime.in"
void arrayKeys(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4618 "runtime.in"
+#line 4628 "runtime.in"
size_t size=checkArray(a);
array *keys=new array();
@@ -6594,22 +6612,22 @@ void arrayKeys(stack *Stack)
}
// Return the cyclic flag for an array.
-#line 4632 "runtime.in"
+#line 4642 "runtime.in"
void arrayCyclicFlag(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4633 "runtime.in"
+#line 4643 "runtime.in"
checkArray(a);
{Stack->push<bool>(a->cyclic()); return;}
}
// Check to see if an array element is initialized.
-#line 4639 "runtime.in"
+#line 4649 "runtime.in"
void arrayInitializedHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
Int n=vm::pop<Int>(Stack);
-#line 4640 "runtime.in"
+#line 4650 "runtime.in"
size_t len=checkArray(a);
bool cyclic=a->cyclic();
if(cyclic && len > 0) n=imod(n,len);
@@ -6619,62 +6637,62 @@ void arrayInitializedHelper(stack *Stack)
}
// Returns the initialize method for an array.
-#line 4650 "runtime.in"
+#line 4660 "runtime.in"
void arrayInitialized(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4651 "runtime.in"
+#line 4661 "runtime.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayInitializedHelper),a)); return;}
}
// The helper function for the cyclic method that sets the cyclic flag.
-#line 4656 "runtime.in"
+#line 4666 "runtime.in"
void arrayCyclicHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
bool b=vm::pop<bool>(Stack);
-#line 4657 "runtime.in"
+#line 4667 "runtime.in"
checkArray(a);
a->cyclic(b);
}
// Set the cyclic flag for an array.
-#line 4663 "runtime.in"
+#line 4673 "runtime.in"
void arrayCyclic(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4664 "runtime.in"
+#line 4674 "runtime.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayCyclicHelper),a)); return;}
}
// The helper function for the push method that does the actual operation.
-#line 4669 "runtime.in"
+#line 4679 "runtime.in"
void arrayPushHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
item x=vm::pop(Stack);
-#line 4670 "runtime.in"
+#line 4680 "runtime.in"
checkArray(a);
a->push(x);
{Stack->push(x); return;}
}
// Returns the push method for an array.
-#line 4677 "runtime.in"
+#line 4687 "runtime.in"
void arrayPush(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4678 "runtime.in"
+#line 4688 "runtime.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayPushHelper),a)); return;}
}
// The helper function for the append method that appends b to a.
-#line 4683 "runtime.in"
+#line 4693 "runtime.in"
void arrayAppendHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
array * b=vm::pop<array *>(Stack);
-#line 4684 "runtime.in"
+#line 4694 "runtime.in"
checkArray(a);
size_t size=checkArray(b);
for(size_t i=0; i < size; i++)
@@ -6682,20 +6700,20 @@ void arrayAppendHelper(stack *Stack)
}
// Returns the append method for an array.
-#line 4692 "runtime.in"
+#line 4702 "runtime.in"
void arrayAppend(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4693 "runtime.in"
+#line 4703 "runtime.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayAppendHelper),a)); return;}
}
// The helper function for the pop method.
-#line 4698 "runtime.in"
+#line 4708 "runtime.in"
void arrayPopHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4699 "runtime.in"
+#line 4709 "runtime.in"
size_t asize=checkArray(a);
if(asize == 0)
error("cannot pop element from empty array");
@@ -6703,22 +6721,22 @@ void arrayPopHelper(stack *Stack)
}
// Returns the pop method for an array.
-#line 4707 "runtime.in"
+#line 4717 "runtime.in"
void arrayPop(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4708 "runtime.in"
+#line 4718 "runtime.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayPopHelper),a)); return;}
}
// The helper function for the insert method.
-#line 4713 "runtime.in"
+#line 4723 "runtime.in"
void arrayInsertHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
array * x=vm::pop<array *>(Stack);
Int i=vm::pop<Int>(Stack);
-#line 4714 "runtime.in"
+#line 4724 "runtime.in"
size_t asize=checkArray(a);
checkArray(x);
if(a->cyclic() && asize > 0) i=imod(i,asize);
@@ -6728,39 +6746,39 @@ void arrayInsertHelper(stack *Stack)
}
// Returns the insert method for an array.
-#line 4724 "runtime.in"
+#line 4734 "runtime.in"
void arrayInsert(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4725 "runtime.in"
+#line 4735 "runtime.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayInsertHelper),a)); return;}
}
// Returns the delete method for an array.
-#line 4730 "runtime.in"
+#line 4740 "runtime.in"
void arrayDelete(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4731 "runtime.in"
+#line 4741 "runtime.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayDeleteHelper),a)); return;}
}
-#line 4735 "runtime.in"
+#line 4745 "runtime.in"
void arrayAlias(stack *Stack)
{
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 4736 "runtime.in"
+#line 4746 "runtime.in"
{Stack->push<bool>(a==b); return;}
}
// Return array formed by indexing array a with elements of integer array b
-#line 4741 "runtime.in"
+#line 4751 "runtime.in"
void arrayIntArray(stack *Stack)
{
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 4742 "runtime.in"
+#line 4752 "runtime.in"
size_t asize=checkArray(a);
size_t bsize=checkArray(b);
array *r=new array(bsize);
@@ -6778,13 +6796,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 4760 "runtime.in"
+#line 4770 "runtime.in"
// Intarray* complement(Intarray *a, Int n);
-void gen449(stack *Stack)
+void gen451(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
Intarray * a=vm::pop<Intarray *>(Stack);
-#line 4761 "runtime.in"
+#line 4771 "runtime.in"
size_t asize=checkArray(a);
array *r=new array(0);
bool *keep=new bool[n];
@@ -6801,12 +6819,12 @@ void gen449(stack *Stack)
}
// Generate the sequence {f(i) : i=0,1,...n-1} given a function f and integer n
-#line 4778 "runtime.in"
+#line 4788 "runtime.in"
void arraySequence(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
callable * f=vm::pop<callable *>(Stack);
-#line 4779 "runtime.in"
+#line 4789 "runtime.in"
if(n < 0) n=0;
array *a=new array(n);
for(Int i=0; i < n; ++i) {
@@ -6818,12 +6836,12 @@ void arraySequence(stack *Stack)
}
// Return the array {0,1,...n-1}
-#line 4791 "runtime.in"
+#line 4801 "runtime.in"
// Intarray* sequence(Int n);
-void gen451(stack *Stack)
+void gen453(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 4792 "runtime.in"
+#line 4802 "runtime.in"
if(n < 0) n=0;
array *a=new array(n);
for(Int i=0; i < n; ++i) {
@@ -6833,12 +6851,12 @@ void gen451(stack *Stack)
}
// Apply a function to each element of an array
-#line 4802 "runtime.in"
+#line 4812 "runtime.in"
void arrayFunction(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
callable * f=vm::pop<callable *>(Stack);
-#line 4803 "runtime.in"
+#line 4813 "runtime.in"
size_t size=checkArray(a);
array *b=new array(size);
for(size_t i=0; i < size; ++i) {
@@ -6849,12 +6867,12 @@ void arrayFunction(stack *Stack)
{Stack->push<array*>(b); return;}
}
-#line 4814 "runtime.in"
+#line 4824 "runtime.in"
void arraySort(stack *Stack)
{
callable * f=vm::pop<callable *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 4815 "runtime.in"
+#line 4825 "runtime.in"
array *c=copyArray(a);
compareFunc=f;
FuncStack=Stack;
@@ -6862,12 +6880,12 @@ void arraySort(stack *Stack)
{Stack->push<array*>(c); return;}
}
-#line 4823 "runtime.in"
+#line 4833 "runtime.in"
// bool all(boolarray *a);
-void gen454(stack *Stack)
+void gen456(stack *Stack)
{
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 4824 "runtime.in"
+#line 4834 "runtime.in"
size_t size=checkArray(a);
bool c=true;
for(size_t i=0; i < size; i++)
@@ -6875,12 +6893,12 @@ void gen454(stack *Stack)
{Stack->push<bool>(c); return;}
}
-#line 4832 "runtime.in"
+#line 4842 "runtime.in"
// boolarray* !(boolarray* a);
-void gen455(stack *Stack)
+void gen457(stack *Stack)
{
boolarray* a=vm::pop<boolarray*>(Stack);
-#line 4833 "runtime.in"
+#line 4843 "runtime.in"
size_t size=checkArray(a);
array *c=new array(size);
for(size_t i=0; i < size; i++)
@@ -6888,12 +6906,12 @@ void gen455(stack *Stack)
{Stack->push<boolarray*>(c); return;}
}
-#line 4841 "runtime.in"
+#line 4851 "runtime.in"
// Int sum(boolarray *a);
-void gen456(stack *Stack)
+void gen458(stack *Stack)
{
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 4842 "runtime.in"
+#line 4852 "runtime.in"
size_t size=checkArray(a);
Int sum=0;
for(size_t i=0; i < size; i++)
@@ -6901,19 +6919,19 @@ void gen456(stack *Stack)
{Stack->push<Int>(sum); return;}
}
-#line 4850 "runtime.in"
+#line 4860 "runtime.in"
void arrayCopy(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4851 "runtime.in"
+#line 4861 "runtime.in"
{Stack->push<array*>(copyArray(a)); return;}
}
-#line 4855 "runtime.in"
+#line 4865 "runtime.in"
void arrayConcat(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4856 "runtime.in"
+#line 4866 "runtime.in"
// a is an array of arrays to be concatenated together.
// The signature is
// T[] concat(... T[][] a);
@@ -6940,27 +6958,27 @@ void arrayConcat(stack *Stack)
{Stack->push<array*>(result); return;}
}
-#line 4883 "runtime.in"
+#line 4893 "runtime.in"
void array2Copy(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4884 "runtime.in"
+#line 4894 "runtime.in"
{Stack->push<array*>(copyArray2(a)); return;}
}
-#line 4888 "runtime.in"
+#line 4898 "runtime.in"
void array3Copy(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4889 "runtime.in"
+#line 4899 "runtime.in"
{Stack->push<array*>(copyArray3(a)); return;}
}
-#line 4893 "runtime.in"
+#line 4903 "runtime.in"
void array2Transpose(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 4894 "runtime.in"
+#line 4904 "runtime.in"
size_t asize=checkArray(a);
array *c=new array(0);
for(size_t i=0; i < asize; i++) {
@@ -6987,12 +7005,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 4921 "runtime.in"
+#line 4931 "runtime.in"
void array3Transpose(stack *Stack)
{
array * perm=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 4922 "runtime.in"
+#line 4932 "runtime.in"
const size_t DIM=3;
if(checkArray(perm) != DIM) {
@@ -7076,14 +7094,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 5006 "runtime.in"
+#line 5016 "runtime.in"
// Int find(boolarray *a, Int n=1);
-void gen463(stack *Stack)
+void gen465(stack *Stack)
{
Int n=vm::pop<Int>(Stack,1);
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 5007 "runtime.in"
-
+#line 5017 "runtime.in"
size_t size=checkArray(a);
Int j=-1;
if(n > 0)
@@ -7101,13 +7118,13 @@ void gen463(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 5026 "runtime.in"
+#line 5035 "runtime.in"
void arrayConditional(stack *Stack)
{
array * c=vm::pop<array *>(Stack);
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 5027 "runtime.in"
+#line 5036 "runtime.in"
size_t size=checkArray(a);
array *r=new array(size);
if(b && c) {
@@ -7131,21 +7148,21 @@ void arrayConditional(stack *Stack)
}
// Return an n x n identity matrix.
-#line 5051 "runtime.in"
+#line 5060 "runtime.in"
// realarray2* identity(Int n);
-void gen465(stack *Stack)
+void gen467(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 5052 "runtime.in"
+#line 5061 "runtime.in"
{Stack->push<realarray2*>(Identity(n)); return;}
}
// Return the diagonal matrix with diagonal entries given by a.
-#line 5057 "runtime.in"
+#line 5066 "runtime.in"
void diagonal(stack *Stack)
{
realarray * a=vm::pop<realarray *>(Stack);
-#line 5058 "runtime.in"
+#line 5067 "runtime.in"
size_t n=checkArray(a);
array *c=new array(n);
for(size_t i=0; i < n; ++i) {
@@ -7161,12 +7178,12 @@ void diagonal(stack *Stack)
}
// Return the inverse of an n x n matrix a using Gauss-Jordan elimination.
-#line 5074 "runtime.in"
+#line 5083 "runtime.in"
// realarray2* inverse(realarray2 *a);
-void gen467(stack *Stack)
+void gen469(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 5075 "runtime.in"
+#line 5084 "runtime.in"
a=copyArray2(a);
size_t n=checkArray(a);
checkSquare(a);
@@ -7259,14 +7276,14 @@ void gen467(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 5168 "runtime.in"
+#line 5177 "runtime.in"
// realarray* solve(realarray2 *a, realarray *b, bool warn=true);
-void gen468(stack *Stack)
+void gen470(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
realarray * b=vm::pop<realarray *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 5169 "runtime.in"
+#line 5178 "runtime.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<realarray*>(new array(0)); return;}
@@ -7316,14 +7333,14 @@ void gen468(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 5219 "runtime.in"
+#line 5228 "runtime.in"
// realarray2* solve(realarray2 *a, realarray2 *b, bool warn=true);
-void gen469(stack *Stack)
+void gen471(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 5220 "runtime.in"
+#line 5229 "runtime.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<realarray2*>(new array(0)); return;}
@@ -7384,12 +7401,12 @@ void gen469(stack *Stack)
}
// Compute the determinant of an n x n matrix.
-#line 5281 "runtime.in"
+#line 5290 "runtime.in"
// real determinant(realarray2 *a);
-void gen470(stack *Stack)
+void gen472(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 5282 "runtime.in"
+#line 5291 "runtime.in"
real *A=copyArray2C(a);
size_t n=checkArray(a);
@@ -7403,13 +7420,13 @@ void gen470(stack *Stack)
{Stack->push<real>(det); return;}
}
-#line 5296 "runtime.in"
+#line 5305 "runtime.in"
// realarray* *(realarray2 *a, realarray *b);
-void gen471(stack *Stack)
+void gen473(stack *Stack)
{
realarray * b=vm::pop<realarray *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 5297 "runtime.in"
+#line 5306 "runtime.in"
size_t n=checkArray(a);
size_t m=checkArray(b);
array *c=new array(n);
@@ -7426,13 +7443,13 @@ void gen471(stack *Stack)
{Stack->push<realarray*>(c); return;}
}
-#line 5314 "runtime.in"
+#line 5323 "runtime.in"
// realarray* *(realarray *a, realarray2 *b);
-void gen472(stack *Stack)
+void gen474(stack *Stack)
{
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 5315 "runtime.in"
+#line 5324 "runtime.in"
size_t n=checkArray(a);
if(n != checkArray(b)) error(incommensurate);
real *A=copyArrayC(a);
@@ -7459,13 +7476,13 @@ void gen472(stack *Stack)
{Stack->push<realarray*>(c); return;}
}
-#line 5342 "runtime.in"
+#line 5351 "runtime.in"
// realarray2* *(realarray2 *a, realarray2 *b);
-void gen473(stack *Stack)
+void gen475(stack *Stack)
{
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 5343 "runtime.in"
+#line 5352 "runtime.in"
size_t n=checkArray(a);
size_t nb=checkArray(b);
@@ -7499,23 +7516,23 @@ void gen473(stack *Stack)
{Stack->push<realarray2*>(c); return;}
}
-#line 5377 "runtime.in"
+#line 5386 "runtime.in"
// triple *(realarray2 *t, triple v);
-void gen474(stack *Stack)
+void gen476(stack *Stack)
{
triple v=vm::pop<triple>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
-#line 5378 "runtime.in"
+#line 5387 "runtime.in"
{Stack->push<triple>(*t*v); return;}
}
-#line 5382 "runtime.in"
+#line 5391 "runtime.in"
// pair project(triple v, realarray2 *t);
-void gen475(stack *Stack)
+void gen477(stack *Stack)
{
realarray2 * t=vm::pop<realarray2 *>(Stack);
triple v=vm::pop<triple>(Stack);
-#line 5383 "runtime.in"
+#line 5392 "runtime.in"
size_t n=checkArray(t);
if(n != 4) error(incommensurate);
array *t0=read<array*>(t,0);
@@ -7540,13 +7557,13 @@ void gen475(stack *Stack)
}
// Compute the dot product of vectors a and b.
-#line 5408 "runtime.in"
+#line 5417 "runtime.in"
// real dot(realarray *a, realarray *b);
-void gen476(stack *Stack)
+void gen478(stack *Stack)
{
realarray * b=vm::pop<realarray *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 5409 "runtime.in"
+#line 5418 "runtime.in"
size_t n=checkArrays(a,b);
real sum=0.0;
for(size_t i=0; i < n; ++i)
@@ -7561,15 +7578,15 @@ void gen476(stack *Stack)
// [ a[2] b[2] c[2] ]
// [ ... ]
// [ c[n-1] a[n-1] b[n-1] ]
-#line 5424 "runtime.in"
+#line 5433 "runtime.in"
// realarray* tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f);
-void gen477(stack *Stack)
+void gen479(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 5425 "runtime.in"
+#line 5434 "runtime.in"
size_t n=checkArrays(a,b);
checkEqual(n,checkArray(c));
checkEqual(n,checkArray(f));
@@ -7666,16 +7683,16 @@ void gen477(stack *Stack)
}
// Root solve by Newton-Raphson
-#line 5522 "runtime.in"
+#line 5531 "runtime.in"
// real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x, bool verbose=false);
-void gen478(stack *Stack)
+void gen480(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 5524 "runtime.in"
+#line 5533 "runtime.in"
static const real fuzz=1000.0*DBL_EPSILON;
Int i=0;
size_t oldPrec=0;
@@ -7721,9 +7738,9 @@ void gen478(stack *Stack)
// Root solve by Newton-Raphson bisection
// cf. routine rtsafe (Press et al., Numerical Recipes, 1991).
-#line 5570 "runtime.in"
+#line 5579 "runtime.in"
// real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1, real x2, bool verbose=false);
-void gen479(stack *Stack)
+void gen481(stack *Stack)
{
bool verbose=vm::pop<bool>(Stack,false);
real x2=vm::pop<real>(Stack);
@@ -7731,7 +7748,7 @@ void gen479(stack *Stack)
callableReal * fprime=vm::pop<callableReal *>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
Int iterations=vm::pop<Int>(Stack,100);
-#line 5572 "runtime.in"
+#line 5581 "runtime.in"
static const real fuzz=1000.0*DBL_EPSILON;
size_t oldPrec=0;
if(verbose)
@@ -7809,16 +7826,16 @@ void gen479(stack *Stack)
{Stack->push<real>((j == iterations) ? DBL_MAX : x); return;}
}
-#line 5650 "runtime.in"
+#line 5659 "runtime.in"
// real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON, real dxmax=0);
-void gen480(stack *Stack)
+void gen482(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 5652 "runtime.in"
+#line 5661 "runtime.in"
real integral;
if(dxmax == 0) dxmax=b-a;
Func=f;
@@ -7829,12 +7846,12 @@ void gen480(stack *Stack)
}
// Compute the fast Fourier transform of a pair array
-#line 5663 "runtime.in"
+#line 5672 "runtime.in"
void pairArrayFFT(stack *Stack)
{
Int sign=vm::pop<Int>(Stack,1);
pairarray * a=vm::pop<pairarray *>(Stack);
-#line 5664 "runtime.in"
+#line 5673 "runtime.in"
unsigned n=(unsigned) checkArray(a);
#ifdef HAVE_LIBFFTW3
array *c=new array(n);
@@ -7862,12 +7879,12 @@ void pairArrayFFT(stack *Stack)
{Stack->push<pairarray*>(c); return;}
}
-#line 5692 "runtime.in"
+#line 5701 "runtime.in"
// Intarray2* triangulate(pairarray *z);
-void gen482(stack *Stack)
+void gen484(stack *Stack)
{
pairarray * z=vm::pop<pairarray *>(Stack);
-#line 5693 "runtime.in"
+#line 5702 "runtime.in"
size_t nv=checkArray(z);
// Call robust version of Gilles Dumoulin's port of Paul Bourke's
// triangulation code.
@@ -7903,55 +7920,55 @@ void gen482(stack *Stack)
// File operations
-#line 5729 "runtime.in"
+#line 5738 "runtime.in"
// bool ==(file *a, file *b);
-void gen483(stack *Stack)
+void gen485(stack *Stack)
{
file * b=vm::pop<file *>(Stack);
file * a=vm::pop<file *>(Stack);
-#line 5730 "runtime.in"
+#line 5739 "runtime.in"
{Stack->push<bool>(a == b); return;}
}
-#line 5735 "runtime.in"
+#line 5744 "runtime.in"
// bool !=(file *a, file *b);
-void gen484(stack *Stack)
+void gen486(stack *Stack)
{
file * b=vm::pop<file *>(Stack);
file * a=vm::pop<file *>(Stack);
-#line 5736 "runtime.in"
+#line 5745 "runtime.in"
{Stack->push<bool>(a != b); return;}
}
-#line 5740 "runtime.in"
+#line 5749 "runtime.in"
void nullFile(stack *Stack)
{
-#line 5741 "runtime.in"
+#line 5750 "runtime.in"
{Stack->push<file*>(&camp::nullfile); return;}
}
-#line 5745 "runtime.in"
+#line 5754 "runtime.in"
// file* input(string name, bool check=true, string comment=commentchar);
-void gen486(stack *Stack)
+void gen488(stack *Stack)
{
string comment=vm::pop<string>(Stack,commentchar);
bool check=vm::pop<bool>(Stack,true);
string name=vm::pop<string>(Stack);
-#line 5746 "runtime.in"
+#line 5755 "runtime.in"
char c=comment.empty() ? (char) 0 : comment[0];
file *f=new ifile(name,c,check);
f->open();
{Stack->push<file*>(f); return;}
}
-#line 5753 "runtime.in"
+#line 5762 "runtime.in"
// file* output(string name, bool update=false, string comment=commentchar);
-void gen487(stack *Stack)
+void gen489(stack *Stack)
{
string comment=vm::pop<string>(Stack,commentchar);
bool update=vm::pop<bool>(Stack,false);
string name=vm::pop<string>(Stack);
-#line 5754 "runtime.in"
+#line 5763 "runtime.in"
file *f;
if(update) {
char c=comment.empty() ? (char) 0 : comment[0];
@@ -7962,13 +7979,13 @@ void gen487(stack *Stack)
{Stack->push<file*>(f); return;}
}
-#line 5765 "runtime.in"
+#line 5774 "runtime.in"
// file* xinput(string name, bool check=true);
-void gen488(stack *Stack)
+void gen490(stack *Stack)
{
bool check=vm::pop<bool>(Stack,true);
string name=vm::pop<string>(Stack);
-#line 5766 "runtime.in"
+#line 5775 "runtime.in"
#ifdef HAVE_RPC_RPC_H
file *f=new ixfile(name,check);
f->open();
@@ -7981,13 +7998,13 @@ void gen488(stack *Stack)
#endif
}
-#line 5779 "runtime.in"
+#line 5788 "runtime.in"
// file* xoutput(string name, bool update=false);
-void gen489(stack *Stack)
+void gen491(stack *Stack)
{
bool update=vm::pop<bool>(Stack,false);
string name=vm::pop<string>(Stack);
-#line 5780 "runtime.in"
+#line 5789 "runtime.in"
#ifdef HAVE_RPC_RPC_H
file *f;
if(update)
@@ -8004,25 +8021,25 @@ void gen489(stack *Stack)
#endif
}
-#line 5797 "runtime.in"
+#line 5806 "runtime.in"
// file* binput(string name, bool check=true);
-void gen490(stack *Stack)
+void gen492(stack *Stack)
{
bool check=vm::pop<bool>(Stack,true);
string name=vm::pop<string>(Stack);
-#line 5798 "runtime.in"
+#line 5807 "runtime.in"
file *f=new ibfile(name,check);
f->open();
{Stack->push<file*>(f); return;}
}
-#line 5804 "runtime.in"
+#line 5813 "runtime.in"
// file* boutput(string name, bool update=false);
-void gen491(stack *Stack)
+void gen493(stack *Stack)
{
bool update=vm::pop<bool>(Stack,false);
string name=vm::pop<string>(Stack);
-#line 5805 "runtime.in"
+#line 5814 "runtime.in"
file *f;
if(update) f=new iobfile(name);
else f=new obfile(name);
@@ -8031,267 +8048,314 @@ void gen491(stack *Stack)
{Stack->push<file*>(f); return;}
}
-#line 5814 "runtime.in"
-// bool eof(file *File);
-void gen492(stack *Stack)
+#line 5823 "runtime.in"
+// bool eof(file *f);
+void gen494(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5815 "runtime.in"
- {Stack->push<bool>(File->eof()); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5824 "runtime.in"
+ {Stack->push<bool>(f->eof()); return;}
}
-#line 5819 "runtime.in"
-// bool eol(file *File);
-void gen493(stack *Stack)
+#line 5828 "runtime.in"
+// bool eol(file *f);
+void gen495(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5820 "runtime.in"
- {Stack->push<bool>(File->eol()); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5829 "runtime.in"
+ {Stack->push<bool>(f->eol()); return;}
}
-#line 5824 "runtime.in"
-// bool error(file *File);
-void gen494(stack *Stack)
+#line 5833 "runtime.in"
+// bool error(file *f);
+void gen496(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5825 "runtime.in"
- {Stack->push<bool>(File->error()); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5834 "runtime.in"
+ {Stack->push<bool>(f->error()); return;}
}
-#line 5829 "runtime.in"
-// void clear(file *File);
-void gen495(stack *Stack)
+#line 5838 "runtime.in"
+// void clear(file *f);
+void gen497(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5830 "runtime.in"
- File->clear();
+ file * f=vm::pop<file *>(Stack);
+#line 5839 "runtime.in"
+ f->clear();
}
-#line 5834 "runtime.in"
-// void close(file *File);
-void gen496(stack *Stack)
+#line 5843 "runtime.in"
+// void close(file *f);
+void gen498(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5835 "runtime.in"
- File->close();
+ file * f=vm::pop<file *>(Stack);
+#line 5844 "runtime.in"
+ f->close();
}
-#line 5839 "runtime.in"
-// Int precision(file *File=NULL, Int digits=0);
-void gen497(stack *Stack)
+#line 5848 "runtime.in"
+// Int precision(file *f=NULL, Int digits=0);
+void gen499(stack *Stack)
{
Int digits=vm::pop<Int>(Stack,0);
- file * File=vm::pop<file *>(Stack,NULL);
-#line 5840 "runtime.in"
- if(File == 0) File=&camp::Stdout;
- {Stack->push<Int>(File->precision(digits)); return;}
+ file * f=vm::pop<file *>(Stack,NULL);
+#line 5849 "runtime.in"
+ if(f == 0) f=&camp::Stdout;
+ {Stack->push<Int>(f->precision(digits)); return;}
}
-#line 5845 "runtime.in"
-// void flush(file *File);
-void gen498(stack *Stack)
+#line 5854 "runtime.in"
+// void flush(file *f);
+void gen500(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5846 "runtime.in"
- File->flush();
+ file * f=vm::pop<file *>(Stack);
+#line 5855 "runtime.in"
+ f->flush();
}
-#line 5850 "runtime.in"
-// string getc(file *File);
-void gen499(stack *Stack)
+#line 5859 "runtime.in"
+// string getc(file *f);
+void gen501(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5851 "runtime.in"
+ file * f=vm::pop<file *>(Stack);
+#line 5860 "runtime.in"
char c=0;
- if(File->isOpen()) File->read(c);
+ if(f->isOpen()) f->read(c);
static char str[1];
str[0]=c;
{Stack->push<string>(string(str)); return;}
}
-#line 5859 "runtime.in"
-// Int tell(file *File);
-void gen500(stack *Stack)
+#line 5868 "runtime.in"
+// Int tell(file *f);
+void gen502(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5860 "runtime.in"
- {Stack->push<Int>(File->tell()); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5869 "runtime.in"
+ {Stack->push<Int>(f->tell()); return;}
}
-#line 5864 "runtime.in"
-// void seek(file *File, Int pos);
-void gen501(stack *Stack)
+#line 5873 "runtime.in"
+// void seek(file *f, Int pos);
+void gen503(stack *Stack)
{
Int pos=vm::pop<Int>(Stack);
- file * File=vm::pop<file *>(Stack);
-#line 5865 "runtime.in"
- File->seek(pos,pos >= 0);
+ file * f=vm::pop<file *>(Stack);
+#line 5874 "runtime.in"
+ f->seek(pos,pos >= 0);
}
-#line 5869 "runtime.in"
-// void seekeof(file *File);
-void gen502(stack *Stack)
+#line 5878 "runtime.in"
+// void seekeof(file *f);
+void gen504(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5870 "runtime.in"
- File->seek(0,false);
+ file * f=vm::pop<file *>(Stack);
+#line 5879 "runtime.in"
+ f->seek(0,false);
}
// Set file dimensions
-#line 5875 "runtime.in"
-// file* dimension(file *File, Int nx);
-void gen503(stack *Stack)
+#line 5884 "runtime.in"
+// file* dimension(file *f, Int nx);
+void gen505(stack *Stack)
{
Int nx=vm::pop<Int>(Stack);
- file * File=vm::pop<file *>(Stack);
-#line 5876 "runtime.in"
- File->dimension(nx);
- {Stack->push<file*>(File); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5885 "runtime.in"
+ f->dimension(nx);
+ {Stack->push<file*>(f); return;}
}
-#line 5881 "runtime.in"
-// file* dimension(file *File, Int nx, Int ny);
-void gen504(stack *Stack)
+#line 5890 "runtime.in"
+// file* dimension(file *f, Int nx, Int ny);
+void gen506(stack *Stack)
{
Int ny=vm::pop<Int>(Stack);
Int nx=vm::pop<Int>(Stack);
- file * File=vm::pop<file *>(Stack);
-#line 5882 "runtime.in"
- File->dimension(nx,ny);
- {Stack->push<file*>(File); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5891 "runtime.in"
+ f->dimension(nx,ny);
+ {Stack->push<file*>(f); return;}
}
-#line 5887 "runtime.in"
-// file* dimension(file *File, Int nx, Int ny, Int nz);
-void gen505(stack *Stack)
+#line 5896 "runtime.in"
+// file* dimension(file *f, Int nx, Int ny, Int nz);
+void gen507(stack *Stack)
{
Int nz=vm::pop<Int>(Stack);
Int ny=vm::pop<Int>(Stack);
Int nx=vm::pop<Int>(Stack);
- file * File=vm::pop<file *>(Stack);
-#line 5888 "runtime.in"
- File->dimension(nx,ny,nz);
- {Stack->push<file*>(File); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5897 "runtime.in"
+ f->dimension(nx,ny,nz);
+ {Stack->push<file*>(f); return;}
}
// Set file to read comma-separated values
-#line 5894 "runtime.in"
-// file* csv(file *File, bool b=true);
-void gen506(stack *Stack)
+#line 5903 "runtime.in"
+// file* csv(file *f, bool b=true);
+void gen508(stack *Stack)
{
bool b=vm::pop<bool>(Stack,true);
- file * File=vm::pop<file *>(Stack);
-#line 5895 "runtime.in"
- File->CSVMode(b);
- {Stack->push<file*>(File); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5904 "runtime.in"
+ f->CSVMode(b);
+ {Stack->push<file*>(f); return;}
}
// Set file to read whitespace-separated values
-#line 5901 "runtime.in"
-// file* word(file *File, bool b=true);
-void gen507(stack *Stack)
+#line 5910 "runtime.in"
+// file* word(file *f, bool b=true);
+void gen509(stack *Stack)
{
bool b=vm::pop<bool>(Stack,true);
- file * File=vm::pop<file *>(Stack);
-#line 5902 "runtime.in"
- File->WordMode(b);
- {Stack->push<file*>(File); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5911 "runtime.in"
+ f->WordMode(b);
+ {Stack->push<file*>(f); return;}
}
// Set file to read arrays in line-at-a-time mode
-#line 5908 "runtime.in"
-// file* line(file *File, bool b=true);
-void gen508(stack *Stack)
+#line 5917 "runtime.in"
+// file* line(file *f, bool b=true);
+void gen510(stack *Stack)
{
bool b=vm::pop<bool>(Stack,true);
- file * File=vm::pop<file *>(Stack);
-#line 5909 "runtime.in"
- File->LineMode(b);
- {Stack->push<file*>(File); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5918 "runtime.in"
+ f->LineMode(b);
+ {Stack->push<file*>(f); return;}
}
-// Set file to read/write single-precision XDR values.
-#line 5915 "runtime.in"
-// file* single(file *File, bool b=true);
-void gen509(stack *Stack)
+// Set file to read/write signed int XDR values.
+#line 5924 "runtime.in"
+// file* signed(file *f, bool b=true);
+void gen511(stack *Stack)
{
bool b=vm::pop<bool>(Stack,true);
- file * File=vm::pop<file *>(Stack);
-#line 5916 "runtime.in"
- File->SingleReal(b);
- File->SingleInt(b);
- {Stack->push<file*>(File); return;}
+ file * f=vm::pop<file *>(Stack);
+#line 5925 "runtime.in"
+ f->SignedInt(b);
+ {Stack->push<file*>(f); return;}
}
-// Set file to read/write single-precision real XDR values.
-#line 5923 "runtime.in"
-// file* single(file *File, real x, bool b=true);
-void gen510(stack *Stack)
+#line 5930 "runtime.in"
+void namePart(stack *Stack)
{
- bool b=vm::pop<bool>(Stack,true);
- real x=vm::pop<real>(Stack);
- file * File=vm::pop<file *>(Stack);
-#line 5924 "runtime.in"
- File->SingleReal(b);
- unused(&x);
- {Stack->push<file*>(File); return;}
+ file f=vm::pop<file>(Stack);
+#line 5931 "runtime.in"
+ {Stack->push<string>(f.filename()); return;}
}
-// Set file to read/write single-precision int XDR values.
-#line 5931 "runtime.in"
-// file* single(file *File, Int x, bool b=true);
-void gen511(stack *Stack)
+#line 5935 "runtime.in"
+void modePart(stack *Stack)
{
- bool b=vm::pop<bool>(Stack,true);
- Int x=vm::pop<Int>(Stack);
- file * File=vm::pop<file *>(Stack);
-#line 5932 "runtime.in"
- File->SingleInt(b);
- unused(&x);
- {Stack->push<file*>(File); return;}
+ file f=vm::pop<file>(Stack);
+#line 5936 "runtime.in"
+ {Stack->push<string>(f.FileMode()); return;}
}
-// Set file to read an array1 (1 Int size followed by a 1d array)
-#line 5939 "runtime.in"
-// file* read1(file *File);
-void gen512(stack *Stack)
-{
- file * File=vm::pop<file *>(Stack);
#line 5940 "runtime.in"
- File->dimension(-2);
- {Stack->push<file*>(File); return;}
+void dimensionPart(stack *Stack)
+{
+ file f=vm::pop<file>(Stack);
+#line 5941 "runtime.in"
+ array *a=new array(3);
+ (*a)[0]=f.Nx();
+ (*a)[1]=f.Ny();
+ (*a)[2]=f.Nz();
+ {Stack->push<array*>(a); return;}
}
-// Set file to read an array2 (2 Int sizes followed by a 2d array)
-#line 5946 "runtime.in"
-// file* read2(file *File);
-void gen513(stack *Stack)
+#line 5949 "runtime.in"
+void lineModePart(stack *Stack)
{
- file * File=vm::pop<file *>(Stack);
-#line 5947 "runtime.in"
- File->dimension(-2,-2);
- {Stack->push<file*>(File); return;}
+ file f=vm::pop<file>(Stack);
+#line 5950 "runtime.in"
+ {Stack->push<bool>(f.LineMode()); return;}
}
-// Set file to read an array3 (3 Int sizes followed by a 3d array)
-#line 5953 "runtime.in"
-// file* read3(file *File);
-void gen514(stack *Stack)
-{
- file * File=vm::pop<file *>(Stack);
#line 5954 "runtime.in"
- File->dimension(-2,-2,-2);
- {Stack->push<file*>(File); return;}
+void csvModePart(stack *Stack)
+{
+ file f=vm::pop<file>(Stack);
+#line 5955 "runtime.in"
+ {Stack->push<bool>(f.CSVMode()); return;}
}
-// Return the last n lines of the history named name.
+#line 5959 "runtime.in"
+void wordModePart(stack *Stack)
+{
+ file f=vm::pop<file>(Stack);
#line 5960 "runtime.in"
+ {Stack->push<bool>(f.WordMode()); return;}
+}
+
+#line 5964 "runtime.in"
+void singleRealModePart(stack *Stack)
+{
+ file f=vm::pop<file>(Stack);
+#line 5965 "runtime.in"
+ {Stack->push<bool>(f.SingleReal()); return;}
+}
+
+#line 5969 "runtime.in"
+void singleIntModePart(stack *Stack)
+{
+ file f=vm::pop<file>(Stack);
+#line 5970 "runtime.in"
+ {Stack->push<bool>(f.SingleInt()); return;}
+}
+
+#line 5974 "runtime.in"
+void signedIntModePart(stack *Stack)
+{
+ file f=vm::pop<file>(Stack);
+#line 5975 "runtime.in"
+ {Stack->push<bool>(f.SignedInt()); return;}
+}
+
+// Set file to read an array1 (1 int size followed by a 1d array)
+#line 5980 "runtime.in"
+// file* read1(file *f);
+void gen521(stack *Stack)
+{
+ file * f=vm::pop<file *>(Stack);
+#line 5981 "runtime.in"
+ f->dimension(-2);
+ {Stack->push<file*>(f); return;}
+}
+
+// Set file to read an array2 (2 int sizes followed by a 2d array)
+#line 5987 "runtime.in"
+// file* read2(file *f);
+void gen522(stack *Stack)
+{
+ file * f=vm::pop<file *>(Stack);
+#line 5988 "runtime.in"
+ f->dimension(-2,-2);
+ {Stack->push<file*>(f); return;}
+}
+
+// Set file to read an array3 (3 int sizes followed by a 3d array)
+#line 5994 "runtime.in"
+// file* read3(file *f);
+void gen523(stack *Stack)
+{
+ file * f=vm::pop<file *>(Stack);
+#line 5995 "runtime.in"
+ f->dimension(-2,-2,-2);
+ {Stack->push<file*>(f); return;}
+}
+
+// Return the last n lines of the history named name.
+#line 6001 "runtime.in"
// stringarray* history(string name, Int n=1);
-void gen515(stack *Stack)
+void gen524(stack *Stack)
{
Int n=vm::pop<Int>(Stack,1);
string name=vm::pop<string>(Stack);
-#line 5961 "runtime.in"
+#line 6002 "runtime.in"
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
bool newhistory=historyMap.find(name) == historyMap.end();
@@ -8323,12 +8387,12 @@ void gen515(stack *Stack)
}
// Return the last n lines of the interactive history.
-#line 5993 "runtime.in"
+#line 6034 "runtime.in"
// stringarray* history(Int n=0);
-void gen516(stack *Stack)
+void gen525(stack *Stack)
{
Int n=vm::pop<Int>(Stack,0);
-#line 5994 "runtime.in"
+#line 6035 "runtime.in"
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
{Stack->push<stringarray*>(get_history(n)); return;}
#else
@@ -8339,14 +8403,14 @@ void gen516(stack *Stack)
// Prompt for a string using prompt, the GNU readline library, and a
// local history named name.
-#line 6005 "runtime.in"
+#line 6046 "runtime.in"
// string readline(string prompt=emptystring, string name=emptystring, bool tabcompletion=false);
-void gen517(stack *Stack)
+void gen526(stack *Stack)
{
bool tabcompletion=vm::pop<bool>(Stack,false);
string name=vm::pop<string>(Stack,emptystring);
string prompt=vm::pop<string>(Stack,emptystring);
-#line 6007 "runtime.in"
+#line 6048 "runtime.in"
if(!isatty(STDIN_FILENO))
{Stack->push<string>(emptystring); return;}
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
@@ -8388,14 +8452,14 @@ void gen517(stack *Stack)
// Save a string in a local history named name.
// If store=true, store the local history in the file historyfilename(name).
-#line 6049 "runtime.in"
+#line 6090 "runtime.in"
// void saveline(string name, string value, bool store=true);
-void gen518(stack *Stack)
+void gen527(stack *Stack)
{
bool store=vm::pop<bool>(Stack,true);
string value=vm::pop<string>(Stack);
string name=vm::pop<string>(Stack);
-#line 6050 "runtime.in"
+#line 6091 "runtime.in"
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
store_history(&history_save);
bool newhistory=historyMap.find(name) == historyMap.end();
@@ -8422,11 +8486,11 @@ void gen518(stack *Stack)
#endif
}
-#line 6077 "runtime.in"
+#line 6118 "runtime.in"
// void generate_random_backtrace();
-void gen519(stack *)
+void gen528(stack *)
{
-#line 6078 "runtime.in"
+#line 6119 "runtime.in"
#if defined(USEGC) && defined(GC_DEBUG) && defined(GC_BACKTRACE)
GC_generate_random_backtrace();
#else
@@ -8434,12 +8498,12 @@ void gen519(stack *)
#endif
}
-#line 6086 "runtime.in"
+#line 6127 "runtime.in"
// void print_random_addresses(Int n=1);
-void gen520(stack *Stack)
+void gen529(stack *Stack)
{
Int n=vm::pop<Int>(Stack,1);
-#line 6087 "runtime.in"
+#line 6128 "runtime.in"
#if defined(USEGC) && defined(GC_DEBUG) && defined(GC_BACKTRACE)
GC_gcollect();
for (Int i=0; i < n; ++i)
@@ -9197,137 +9261,137 @@ void gen_base_venv(venv &ve)
#line 4392 "runtime.in"
addFunc(ve, run::gen411, primVoid(), "clear");
#line 4397 "runtime.in"
- addFunc(ve, run::gen412, primString() , "stripdirectory", formal(primString(), "s", false, false));
-#line 4403 "runtime.in"
- addFunc(ve, run::gen413, primString() , "stripfile", formal(primString(), "s", false, false));
-#line 4409 "runtime.in"
- addFunc(ve, run::gen414, primString() , "stripextension", formal(primString(), "s", false, false));
-#line 4415 "runtime.in"
- addFunc(ve, run::gen415, primInt(), "convert", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false));
-#line 4433 "runtime.in"
- addFunc(ve, run::gen416, primInt(), "animate", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false));
-#line 4449 "runtime.in"
- addFunc(ve, run::gen417, primInt(), "delete", formal(primString(), "s", false, false));
+ addFunc(ve, run::gen412, primVoid(), "warn", formal(primString() , "s", false, false));
+#line 4402 "runtime.in"
+ addFunc(ve, run::gen413, primVoid(), "nowarn", formal(primString() , "s", false, false));
+#line 4407 "runtime.in"
+ addFunc(ve, run::gen414, primString() , "stripdirectory", formal(primString(), "s", false, false));
+#line 4413 "runtime.in"
+ addFunc(ve, run::gen415, primString() , "stripfile", formal(primString(), "s", false, false));
+#line 4419 "runtime.in"
+ addFunc(ve, run::gen416, primString() , "stripextension", formal(primString(), "s", false, false));
+#line 4425 "runtime.in"
+ addFunc(ve, run::gen417, primInt(), "convert", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false));
+#line 4443 "runtime.in"
+ addFunc(ve, run::gen418, primInt(), "animate", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false));
#line 4459 "runtime.in"
- addFunc(ve, run::gen418, primInt(), "rename", formal(primString(), "from", false, false), formal(primString(), "to", false, false));
-#line 4758 "runtime.in"
- addFunc(ve, run::gen449, IntArray(), "complement", formal(IntArray(), "a", false, false), formal(primInt(), "n", false, false));
-#line 4790 "runtime.in"
- addFunc(ve, run::gen451, IntArray(), "sequence", formal(primInt(), "n", false, false));
-#line 4823 "runtime.in"
- addFunc(ve, run::gen454, primBoolean(), "all", formal(boolArray(), "a", false, false));
-#line 4832 "runtime.in"
- addFunc(ve, run::gen455, boolArray(), "!", formal(boolArray(), "a", false, false));
-#line 4841 "runtime.in"
- addFunc(ve, run::gen456, primInt(), "sum", formal(boolArray(), "a", false, false));
-#line 5004 "runtime.in"
- addFunc(ve, run::gen463, primInt(), "find", formal(boolArray(), "a", false, false), formal(primInt(), "n", true, false));
-#line 5050 "runtime.in"
- addFunc(ve, run::gen465, realArray2(), "identity", formal(primInt(), "n", false, false));
-#line 5073 "runtime.in"
- addFunc(ve, run::gen467, realArray2(), "inverse", formal(realArray2(), "a", false, false));
-#line 5165 "runtime.in"
- addFunc(ve, run::gen468, realArray(), "solve", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false), formal(primBoolean(), "warn", true, false));
-#line 5216 "runtime.in"
- addFunc(ve, run::gen469, realArray2(), "solve", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false), formal(primBoolean(), "warn", true, false));
-#line 5280 "runtime.in"
- addFunc(ve, run::gen470, primReal(), "determinant", formal(realArray2(), "a", false, false));
-#line 5296 "runtime.in"
- addFunc(ve, run::gen471, realArray(), "*", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false));
-#line 5314 "runtime.in"
- addFunc(ve, run::gen472, realArray(), "*", formal(realArray(), "a", false, false), formal(realArray2(), "b", false, false));
-#line 5342 "runtime.in"
- addFunc(ve, run::gen473, realArray2(), "*", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false));
-#line 5377 "runtime.in"
- addFunc(ve, run::gen474, primTriple(), "*", formal(realArray2(), "t", false, false), formal(primTriple(), "v", false, false));
-#line 5382 "runtime.in"
- addFunc(ve, run::gen475, primPair(), "project", formal(primTriple(), "v", false, false), formal(realArray2(), "t", false, false));
-#line 5407 "runtime.in"
- addFunc(ve, run::gen476, primReal(), "dot", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false));
-#line 5417 "runtime.in"
- addFunc(ve, run::gen477, realArray(), "tridiagonal", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false), formal(realArray(), "c", false, false), formal(realArray(), "f", false, false));
-#line 5521 "runtime.in"
- addFunc(ve, run::gen478, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x", false, false), formal(primBoolean(), "verbose", true, false));
-#line 5568 "runtime.in"
- addFunc(ve, run::gen479, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x1", false, false), formal(primReal(), "x2", false, false), formal(primBoolean(), "verbose", true, false));
-#line 5650 "runtime.in"
- addFunc(ve, run::gen480, primReal(), "simpson", formal(realRealFunction(), "f", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "acc", true, false), formal(primReal(), "dxmax", true, false));
-#line 5692 "runtime.in"
- addFunc(ve, run::gen482, IntArray2(), "triangulate", formal(pairArray(), "z", false, false));
-#line 5727 "runtime.in"
- addFunc(ve, run::gen483, primBoolean(), "==", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false));
-#line 5735 "runtime.in"
- addFunc(ve, run::gen484, primBoolean(), "!=", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false));
-#line 5745 "runtime.in"
- addFunc(ve, run::gen486, primFile(), "input", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false), formal(primString() , "comment", true, false));
-#line 5753 "runtime.in"
- addFunc(ve, run::gen487, primFile(), "output", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false), formal(primString() , "comment", true, false));
-#line 5765 "runtime.in"
- addFunc(ve, run::gen488, primFile(), "xinput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false));
-#line 5779 "runtime.in"
- addFunc(ve, run::gen489, primFile(), "xoutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false));
-#line 5797 "runtime.in"
- addFunc(ve, run::gen490, primFile(), "binput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false));
-#line 5804 "runtime.in"
- addFunc(ve, run::gen491, primFile(), "boutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false));
-#line 5814 "runtime.in"
- addFunc(ve, run::gen492, primBoolean(), "eof", formal(primFile(), "file", false, false));
-#line 5819 "runtime.in"
- addFunc(ve, run::gen493, primBoolean(), "eol", formal(primFile(), "file", false, false));
-#line 5824 "runtime.in"
- addFunc(ve, run::gen494, primBoolean(), "error", formal(primFile(), "file", false, false));
-#line 5829 "runtime.in"
- addFunc(ve, run::gen495, primVoid(), "clear", formal(primFile(), "file", false, false));
-#line 5834 "runtime.in"
- addFunc(ve, run::gen496, primVoid(), "close", formal(primFile(), "file", false, false));
-#line 5839 "runtime.in"
- addFunc(ve, run::gen497, primInt(), "precision", formal(primFile(), "file", true, false), formal(primInt(), "digits", true, false));
-#line 5845 "runtime.in"
- addFunc(ve, run::gen498, primVoid(), "flush", formal(primFile(), "file", false, false));
-#line 5850 "runtime.in"
- addFunc(ve, run::gen499, primString() , "getc", formal(primFile(), "file", false, false));
+ addFunc(ve, run::gen419, primInt(), "delete", formal(primString(), "s", false, false));
+#line 4469 "runtime.in"
+ addFunc(ve, run::gen420, primInt(), "rename", formal(primString(), "from", false, false), formal(primString(), "to", false, false));
+#line 4768 "runtime.in"
+ addFunc(ve, run::gen451, IntArray(), "complement", formal(IntArray(), "a", false, false), formal(primInt(), "n", false, false));
+#line 4800 "runtime.in"
+ addFunc(ve, run::gen453, IntArray(), "sequence", formal(primInt(), "n", false, false));
+#line 4833 "runtime.in"
+ addFunc(ve, run::gen456, primBoolean(), "all", formal(boolArray(), "a", false, false));
+#line 4842 "runtime.in"
+ addFunc(ve, run::gen457, boolArray(), "!", formal(boolArray(), "a", false, false));
+#line 4851 "runtime.in"
+ addFunc(ve, run::gen458, primInt(), "sum", formal(boolArray(), "a", false, false));
+#line 5014 "runtime.in"
+ addFunc(ve, run::gen465, primInt(), "find", formal(boolArray(), "a", false, false), formal(primInt(), "n", true, false));
+#line 5059 "runtime.in"
+ addFunc(ve, run::gen467, realArray2(), "identity", formal(primInt(), "n", false, false));
+#line 5082 "runtime.in"
+ addFunc(ve, run::gen469, realArray2(), "inverse", formal(realArray2(), "a", false, false));
+#line 5174 "runtime.in"
+ addFunc(ve, run::gen470, realArray(), "solve", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false), formal(primBoolean(), "warn", true, false));
+#line 5225 "runtime.in"
+ addFunc(ve, run::gen471, realArray2(), "solve", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false), formal(primBoolean(), "warn", true, false));
+#line 5289 "runtime.in"
+ addFunc(ve, run::gen472, primReal(), "determinant", formal(realArray2(), "a", false, false));
+#line 5305 "runtime.in"
+ addFunc(ve, run::gen473, realArray(), "*", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false));
+#line 5323 "runtime.in"
+ addFunc(ve, run::gen474, realArray(), "*", formal(realArray(), "a", false, false), formal(realArray2(), "b", false, false));
+#line 5351 "runtime.in"
+ addFunc(ve, run::gen475, realArray2(), "*", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false));
+#line 5386 "runtime.in"
+ addFunc(ve, run::gen476, primTriple(), "*", formal(realArray2(), "t", false, false), formal(primTriple(), "v", false, false));
+#line 5391 "runtime.in"
+ addFunc(ve, run::gen477, primPair(), "project", formal(primTriple(), "v", false, false), formal(realArray2(), "t", false, false));
+#line 5416 "runtime.in"
+ addFunc(ve, run::gen478, primReal(), "dot", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false));
+#line 5426 "runtime.in"
+ addFunc(ve, run::gen479, realArray(), "tridiagonal", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false), formal(realArray(), "c", false, false), formal(realArray(), "f", false, false));
+#line 5530 "runtime.in"
+ addFunc(ve, run::gen480, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x", false, false), formal(primBoolean(), "verbose", true, false));
+#line 5577 "runtime.in"
+ addFunc(ve, run::gen481, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x1", false, false), formal(primReal(), "x2", false, false), formal(primBoolean(), "verbose", true, false));
+#line 5659 "runtime.in"
+ addFunc(ve, run::gen482, primReal(), "simpson", formal(realRealFunction(), "f", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "acc", true, false), formal(primReal(), "dxmax", true, false));
+#line 5701 "runtime.in"
+ addFunc(ve, run::gen484, IntArray2(), "triangulate", formal(pairArray(), "z", false, false));
+#line 5736 "runtime.in"
+ addFunc(ve, run::gen485, primBoolean(), "==", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false));
+#line 5744 "runtime.in"
+ addFunc(ve, run::gen486, primBoolean(), "!=", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false));
+#line 5754 "runtime.in"
+ addFunc(ve, run::gen488, primFile(), "input", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false), formal(primString() , "comment", true, false));
+#line 5762 "runtime.in"
+ addFunc(ve, run::gen489, primFile(), "output", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false), formal(primString() , "comment", true, false));
+#line 5774 "runtime.in"
+ addFunc(ve, run::gen490, primFile(), "xinput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false));
+#line 5788 "runtime.in"
+ addFunc(ve, run::gen491, primFile(), "xoutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false));
+#line 5806 "runtime.in"
+ addFunc(ve, run::gen492, primFile(), "binput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false));
+#line 5813 "runtime.in"
+ addFunc(ve, run::gen493, primFile(), "boutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false));
+#line 5823 "runtime.in"
+ addFunc(ve, run::gen494, primBoolean(), "eof", formal(primFile(), "f", false, false));
+#line 5828 "runtime.in"
+ addFunc(ve, run::gen495, primBoolean(), "eol", formal(primFile(), "f", false, false));
+#line 5833 "runtime.in"
+ addFunc(ve, run::gen496, primBoolean(), "error", formal(primFile(), "f", false, false));
+#line 5838 "runtime.in"
+ addFunc(ve, run::gen497, primVoid(), "clear", formal(primFile(), "f", false, false));
+#line 5843 "runtime.in"
+ addFunc(ve, run::gen498, primVoid(), "close", formal(primFile(), "f", false, false));
+#line 5848 "runtime.in"
+ addFunc(ve, run::gen499, primInt(), "precision", formal(primFile(), "f", true, false), formal(primInt(), "digits", true, false));
+#line 5854 "runtime.in"
+ addFunc(ve, run::gen500, primVoid(), "flush", formal(primFile(), "f", false, false));
#line 5859 "runtime.in"
- addFunc(ve, run::gen500, primInt(), "tell", formal(primFile(), "file", false, false));
-#line 5864 "runtime.in"
- addFunc(ve, run::gen501, primVoid(), "seek", formal(primFile(), "file", false, false), formal(primInt(), "pos", false, false));
-#line 5869 "runtime.in"
- addFunc(ve, run::gen502, primVoid(), "seekeof", formal(primFile(), "file", false, false));
-#line 5874 "runtime.in"
- addFunc(ve, run::gen503, primFile(), "dimension", formal(primFile(), "file", false, false), formal(primInt(), "nx", false, false));
-#line 5881 "runtime.in"
- addFunc(ve, run::gen504, primFile(), "dimension", formal(primFile(), "file", false, false), formal(primInt(), "nx", false, false), formal(primInt(), "ny", false, false));
-#line 5887 "runtime.in"
- addFunc(ve, run::gen505, primFile(), "dimension", formal(primFile(), "file", false, false), formal(primInt(), "nx", false, false), formal(primInt(), "ny", false, false), formal(primInt(), "nz", false, false));
-#line 5893 "runtime.in"
- addFunc(ve, run::gen506, primFile(), "csv", formal(primFile(), "file", false, false), formal(primBoolean(), "b", true, false));
-#line 5900 "runtime.in"
- addFunc(ve, run::gen507, primFile(), "word", formal(primFile(), "file", false, false), formal(primBoolean(), "b", true, false));
-#line 5907 "runtime.in"
- addFunc(ve, run::gen508, primFile(), "line", formal(primFile(), "file", false, false), formal(primBoolean(), "b", true, false));
-#line 5914 "runtime.in"
- addFunc(ve, run::gen509, primFile(), "single", formal(primFile(), "file", false, false), formal(primBoolean(), "b", true, false));
-#line 5922 "runtime.in"
- addFunc(ve, run::gen510, primFile(), "single", formal(primFile(), "file", false, false), formal(primReal(), "x", false, false), formal(primBoolean(), "b", true, false));
-#line 5930 "runtime.in"
- addFunc(ve, run::gen511, primFile(), "single", formal(primFile(), "file", false, false), formal(primInt(), "x", false, false), formal(primBoolean(), "b", true, false));
-#line 5938 "runtime.in"
- addFunc(ve, run::gen512, primFile(), "read1", formal(primFile(), "file", false, false));
-#line 5945 "runtime.in"
- addFunc(ve, run::gen513, primFile(), "read2", formal(primFile(), "file", false, false));
-#line 5952 "runtime.in"
- addFunc(ve, run::gen514, primFile(), "read3", formal(primFile(), "file", false, false));
-#line 5959 "runtime.in"
- addFunc(ve, run::gen515, stringArray(), "history", formal(primString() , "name", false, false), formal(primInt(), "n", true, false));
-#line 5992 "runtime.in"
- addFunc(ve, run::gen516, stringArray(), "history", formal(primInt(), "n", true, false));
-#line 6003 "runtime.in"
- addFunc(ve, run::gen517, primString() , "readline", formal(primString() , "prompt", true, false), formal(primString() , "name", true, false), formal(primBoolean(), "tabcompletion", true, false));
-#line 6047 "runtime.in"
- addFunc(ve, run::gen518, primVoid(), "saveline", formal(primString() , "name", false, false), formal(primString() , "value", false, false), formal(primBoolean(), "store", true, false));
-#line 6077 "runtime.in"
- addFunc(ve, run::gen519, primVoid(), "generate_random_backtrace");
-#line 6086 "runtime.in"
- addFunc(ve, run::gen520, primVoid(), "print_random_addresses", formal(primInt(), "n", true, false));
+ addFunc(ve, run::gen501, primString() , "getc", formal(primFile(), "f", false, false));
+#line 5868 "runtime.in"
+ addFunc(ve, run::gen502, primInt(), "tell", formal(primFile(), "f", false, false));
+#line 5873 "runtime.in"
+ addFunc(ve, run::gen503, primVoid(), "seek", formal(primFile(), "f", false, false), formal(primInt(), "pos", false, false));
+#line 5878 "runtime.in"
+ addFunc(ve, run::gen504, primVoid(), "seekeof", formal(primFile(), "f", false, false));
+#line 5883 "runtime.in"
+ addFunc(ve, run::gen505, primFile(), "dimension", formal(primFile(), "f", false, false), formal(primInt(), "nx", false, false));
+#line 5890 "runtime.in"
+ addFunc(ve, run::gen506, primFile(), "dimension", formal(primFile(), "f", false, false), formal(primInt(), "nx", false, false), formal(primInt(), "ny", false, false));
+#line 5896 "runtime.in"
+ addFunc(ve, run::gen507, primFile(), "dimension", formal(primFile(), "f", false, false), formal(primInt(), "nx", false, false), formal(primInt(), "ny", false, false), formal(primInt(), "nz", false, false));
+#line 5902 "runtime.in"
+ addFunc(ve, run::gen508, primFile(), "csv", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false));
+#line 5909 "runtime.in"
+ addFunc(ve, run::gen509, primFile(), "word", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false));
+#line 5916 "runtime.in"
+ addFunc(ve, run::gen510, primFile(), "line", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false));
+#line 5923 "runtime.in"
+ addFunc(ve, run::gen511, primFile(), "signed", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false));
+#line 5979 "runtime.in"
+ addFunc(ve, run::gen521, primFile(), "read1", formal(primFile(), "f", false, false));
+#line 5986 "runtime.in"
+ addFunc(ve, run::gen522, primFile(), "read2", formal(primFile(), "f", false, false));
+#line 5993 "runtime.in"
+ addFunc(ve, run::gen523, primFile(), "read3", formal(primFile(), "f", false, false));
+#line 6000 "runtime.in"
+ addFunc(ve, run::gen524, stringArray(), "history", formal(primString() , "name", false, false), formal(primInt(), "n", true, false));
+#line 6033 "runtime.in"
+ addFunc(ve, run::gen525, stringArray(), "history", formal(primInt(), "n", true, false));
+#line 6044 "runtime.in"
+ addFunc(ve, run::gen526, primString() , "readline", formal(primString() , "prompt", true, false), formal(primString() , "name", true, false), formal(primBoolean(), "tabcompletion", true, false));
+#line 6088 "runtime.in"
+ addFunc(ve, run::gen527, primVoid(), "saveline", formal(primString() , "name", false, false), formal(primString() , "value", false, false), formal(primBoolean(), "store", true, false));
+#line 6118 "runtime.in"
+ addFunc(ve, run::gen528, primVoid(), "generate_random_backtrace");
+#line 6127 "runtime.in"
+ addFunc(ve, run::gen529, primVoid(), "print_random_addresses", formal(primInt(), "n", true, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runtime.h b/Build/source/utils/asymptote/runtime.h
index f05fcb2255f..024cd7d19ff 100644
--- a/Build/source/utils/asymptote/runtime.h
+++ b/Build/source/utils/asymptote/runtime.h
@@ -95,6 +95,15 @@ void arrayConditional(vm::stack *);
void diagonal(vm::stack *);
void pairArrayFFT(vm::stack *);
void nullFile(vm::stack *);
+void namePart(vm::stack *);
+void modePart(vm::stack *);
+void dimensionPart(vm::stack *);
+void lineModePart(vm::stack *);
+void csvModePart(vm::stack *);
+void wordModePart(vm::stack *);
+void singleRealModePart(vm::stack *);
+void singleIntModePart(vm::stack *);
+void signedIntModePart(vm::stack *);
}
#endif // RUNTIME_H
diff --git a/Build/source/utils/asymptote/runtime.in b/Build/source/utils/asymptote/runtime.in
index c8b30a2efd6..09dc5ca3cc8 100644
--- a/Build/source/utils/asymptote/runtime.in
+++ b/Build/source/utils/asymptote/runtime.in
@@ -165,7 +165,7 @@ typedef callable callableTransform;
using vm::array;
using types::function;
-#define PRIMITIVE(name,Name,asyName) using types::prim##Name;
+#define PRIMITIVE(name,Name,asyName) using types::prim##Name;
#include <primitives.h>
#undef PRIMITIVE
@@ -4394,6 +4394,16 @@ void clear()
bplist.clear();
}
+void warn(string s)
+{
+ Warn(s);
+}
+
+void nowarn(string s)
+{
+ noWarn(s);
+}
+
// Strip directory from string
string stripdirectory(string *s)
{
@@ -5005,7 +5015,6 @@ array* :array3Transpose(array *a, array *perm)
// If n is negative, search backwards.
Int find(boolarray *a, Int n=1)
{
-
size_t size=checkArray(a);
Int j=-1;
if(n > 0)
@@ -5811,149 +5820,181 @@ file* boutput(string name, bool update=false)
return f;
}
-bool eof(file *File)
+bool eof(file *f)
{
- return File->eof();
+ return f->eof();
}
-bool eol(file *File)
+bool eol(file *f)
{
- return File->eol();
+ return f->eol();
}
-bool error(file *File)
+bool error(file *f)
{
- return File->error();
+ return f->error();
}
-void clear(file *File)
+void clear(file *f)
{
- File->clear();
+ f->clear();
}
-void close(file *File)
+void close(file *f)
{
- File->close();
+ f->close();
}
-Int precision(file *File=NULL, Int digits=0)
+Int precision(file *f=NULL, Int digits=0)
{
- if(File == 0) File=&camp::Stdout;
- return File->precision(digits);
+ if(f == 0) f=&camp::Stdout;
+ return f->precision(digits);
}
-void flush(file *File)
+void flush(file *f)
{
- File->flush();
+ f->flush();
}
-string getc(file *File)
+string getc(file *f)
{
char c=0;
- if(File->isOpen()) File->read(c);
+ if(f->isOpen()) f->read(c);
static char str[1];
str[0]=c;
return string(str);
}
-Int tell(file *File)
+Int tell(file *f)
{
- return File->tell();
+ return f->tell();
}
-void seek(file *File, Int pos)
+void seek(file *f, Int pos)
{
- File->seek(pos,pos >= 0);
+ f->seek(pos,pos >= 0);
}
-void seekeof(file *File)
+void seekeof(file *f)
{
- File->seek(0,false);
+ f->seek(0,false);
}
// Set file dimensions
-file* dimension(file *File, Int nx)
+file* dimension(file *f, Int nx)
{
- File->dimension(nx);
- return File;
+ f->dimension(nx);
+ return f;
}
-file* dimension(file *File, Int nx, Int ny)
+file* dimension(file *f, Int nx, Int ny)
{
- File->dimension(nx,ny);
- return File;
+ f->dimension(nx,ny);
+ return f;
}
-file* dimension(file *File, Int nx, Int ny, Int nz)
+file* dimension(file *f, Int nx, Int ny, Int nz)
{
- File->dimension(nx,ny,nz);
- return File;
+ f->dimension(nx,ny,nz);
+ return f;
}
// Set file to read comma-separated values
-file* csv(file *File, bool b=true)
+file* csv(file *f, bool b=true)
{
- File->CSVMode(b);
- return File;
+ f->CSVMode(b);
+ return f;
}
// Set file to read whitespace-separated values
-file* word(file *File, bool b=true)
+file* word(file *f, bool b=true)
{
- File->WordMode(b);
- return File;
+ f->WordMode(b);
+ return f;
}
// Set file to read arrays in line-at-a-time mode
-file* line(file *File, bool b=true)
+file* line(file *f, bool b=true)
+{
+ f->LineMode(b);
+ return f;
+}
+
+// Set file to read/write signed int XDR values.
+file* signed(file *f, bool b=true)
{
- File->LineMode(b);
- return File;
+ f->SignedInt(b);
+ return f;
}
-// Set file to read/write single-precision XDR values.
-file* single(file *File, bool b=true)
+string :namePart(file f)
{
- File->SingleReal(b);
- File->SingleInt(b);
- return File;
+ return f.filename();
}
-// Set file to read/write single-precision real XDR values.
-file* single(file *File, real x, bool b=true)
+string :modePart(file f)
{
- File->SingleReal(b);
- unused(&x);
- return File;
+ return f.FileMode();
}
-// Set file to read/write single-precision int XDR values.
-file* single(file *File, Int x, bool b=true)
+array * :dimensionPart(file f)
{
- File->SingleInt(b);
- unused(&x);
- return File;
+ array *a=new array(3);
+ (*a)[0]=f.Nx();
+ (*a)[1]=f.Ny();
+ (*a)[2]=f.Nz();
+ return a;
}
-// Set file to read an array1 (1 Int size followed by a 1d array)
-file* read1(file *File)
+bool :lineModePart(file f)
{
- File->dimension(-2);
- return File;
+ return f.LineMode();
}
-// Set file to read an array2 (2 Int sizes followed by a 2d array)
-file* read2(file *File)
+bool :csvModePart(file f)
{
- File->dimension(-2,-2);
- return File;
+ return f.CSVMode();
}
-// Set file to read an array3 (3 Int sizes followed by a 3d array)
-file* read3(file *File)
+bool :wordModePart(file f)
{
- File->dimension(-2,-2,-2);
- return File;
+ return f.WordMode();
+}
+
+bool :singleRealModePart(file f)
+{
+ return f.SingleReal();
+}
+
+bool :singleIntModePart(file f)
+{
+ return f.SingleInt();
+}
+
+bool :signedIntModePart(file f)
+{
+ return f.SignedInt();
+}
+
+// Set file to read an array1 (1 int size followed by a 1d array)
+file* read1(file *f)
+{
+ f->dimension(-2);
+ return f;
+}
+
+// Set file to read an array2 (2 int sizes followed by a 2d array)
+file* read2(file *f)
+{
+ f->dimension(-2,-2);
+ return f;
+}
+
+// Set file to read an array3 (3 int sizes followed by a 3d array)
+file* read3(file *f)
+{
+ f->dimension(-2,-2,-2);
+ return f;
}
// Return the last n lines of the history named name.
diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc
index 2e0335d17d4..2e09daa6d95 100644
--- a/Build/source/utils/asymptote/settings.cc
+++ b/Build/source/utils/asymptote/settings.cc
@@ -14,6 +14,7 @@
#include <locale.h>
#include <unistd.h>
#include <algorithm>
+#include <cstdarg>
#include "common.h"
@@ -216,6 +217,35 @@ types::record *getSettingsModule() {
return settingsModule;
}
+void Warn(const string& s)
+{
+ array *Warn=getSetting<array *>("warnings");
+ size_t size=checkArray(Warn);
+ if(s.empty()) return;
+ for(size_t i=0; i < size; i++)
+ if(vm::read<string>(Warn,i) == s) return;
+ Warn->push(s);
+}
+
+void noWarn(const string& s)
+{
+ array *Warn=getSetting<array *>("warnings");
+ size_t size=checkArray(Warn);
+ for(size_t i=0; i < size; i++)
+ if(vm::read<string>(Warn,i) == s)
+ (*Warn).erase((*Warn).begin()+i,(*Warn).begin()+i+1);
+}
+
+string warn(const string& s)
+{
+ if(getSetting<bool>("debug")) return s;
+ array *Warn=getSetting<array *>("warnings");
+ size_t size=checkArray(Warn);
+ for(size_t i=0; i < size; i++)
+ if(vm::read<string>(Warn,i) == s) return s;
+ return "";
+}
+
// The dictionaries of long options and short options.
class option;
typedef mem::map<CONST string, option *> optionsMap_t;
@@ -484,7 +514,7 @@ struct argumentSetting : public itemSetting {
struct stringSetting : public argumentSetting {
stringSetting(string name, char code,
string argname, string desc,
- string defaultValue)
+ string defaultValue="")
: argumentSetting(name, code, argname, desc.empty() ? "" :
desc+(defaultValue.empty() ? "" : " ["+defaultValue+"]"),
types::primString(), (item)defaultValue) {}
@@ -498,7 +528,7 @@ struct stringSetting : public argumentSetting {
struct userSetting : public argumentSetting {
userSetting(string name, char code,
string argname, string desc,
- string defaultValue)
+ string defaultValue="")
: argumentSetting(name, code, argname, desc,
types::primString(), (item)defaultValue) {}
@@ -510,6 +540,41 @@ struct userSetting : public argumentSetting {
}
};
+struct warnSetting : public option {
+ warnSetting(string name, char code,
+ string argname, string desc)
+ : option(name, code, argname, desc, true) {}
+
+ bool getOption() {
+ Warn(string(optarg));
+ return true;
+ }
+
+ option *negation(string name) {
+ struct negOption : public option {
+ warnSetting &base;
+
+ negOption(warnSetting &base, string name, string argname)
+ : option(name, 0, argname, ""), base(base) {}
+
+ bool getOption() {
+ noWarn(string(optarg));
+ return true;
+ }
+ };
+ return new negOption(*this, name, argname);
+ }
+
+ void add() {
+ option::add();
+ negation("no"+name)->add();
+ if (code) {
+ string nocode="no"; nocode.push_back(code);
+ negation(nocode)->add();
+ }
+ }
+};
+
string GetEnv(string s, string Default) {
transform(s.begin(), s.end(), s.begin(), toupper);
string t=Getenv(("ASYMPTOTE_"+s).c_str(),msdos);
@@ -598,8 +663,8 @@ struct alignSetting : public argumentSetting {
}
};
-struct ButtonSetting : public itemSetting {
- ButtonSetting(string name, array *defaultValue)
+struct stringArraySetting : public itemSetting {
+ stringArraySetting(string name, array *defaultValue)
: itemSetting(name, 0, "", "",
types::stringArray(), (item) defaultValue) {}
@@ -932,6 +997,31 @@ void no_GCwarn(char *, GC_word)
}
#endif
+array* Array(const char *s ...)
+{
+ va_list v;
+ size_t count=0;
+ const char *s0=s;
+
+ va_start(v,s);
+ while(*s) {
+ ++count;
+ s=va_arg(v,char *);
+ }
+ va_end(v);
+
+ array *a=new array(count);
+ s=s0;
+ va_start(v,s);
+ for(size_t i=0; i < count; ++i) {
+ (*a)[i]=string(s);
+ s=va_arg(v,char *);
+ }
+ va_end(v);
+
+ return a;
+}
+
void initSettings() {
static bool initialize=true;
if(initialize) {
@@ -947,44 +1037,33 @@ void initSettings() {
// SHIFT LEFT: zoom
// CTRL LEFT: shift
// ALT LEFT: pan
+ array *leftbutton=Array("rotate","zoom","shift","pan","");
- array *leftbutton=new array(4);
- (*leftbutton)[0]=string("rotate");
- (*leftbutton)[1]=string("zoom");
- (*leftbutton)[2]=string("shift");
- (*leftbutton)[3]=string("pan");
+// MIDDLE: menu (must be unmodified; ignores Shift, Ctrl, and Alt)
+ array *middlebutton=Array("menu","");
-// MIDDLE: menu
-
- array *middlebutton=new array(1);
- (*middlebutton)[0]=string("menu");
-
-// RIGHT: zoom
+// RIGHT: zoom/menu (must be unmodified)
// SHIFT RIGHT: rotateX
// CTRL RIGHT: rotateY
// ALT RIGHT: rotateZ
-
- array *rightbutton=new array(4);
- (*rightbutton)[0]=string("zoom");
- (*rightbutton)[1]=string("rotateX");
- (*rightbutton)[2]=string("rotateY");
- (*rightbutton)[3]=string("rotateZ");
+ array *rightbutton=Array("zoom/menu","rotateX","rotateY","rotateZ","");
// WHEEL_UP: zoomin
-
- array *wheelup=new array(1);
- (*wheelup)[0]=string("zoomin");
+ array *wheelup=Array("zoomin","");
// WHEEL_DOWN: zoomout
+ array *wheeldown=Array("zoomout","");
+
+ array *Warn=Array("writeoverloaded","");
- array *wheeldown=new array(1);
- (*wheeldown)[0]=string("zoomout");
+ addOption(new stringArraySetting("leftbutton", leftbutton));
+ addOption(new stringArraySetting("middlebutton", middlebutton));
+ addOption(new stringArraySetting("rightbutton", rightbutton));
+ addOption(new stringArraySetting("wheelup", wheelup));
+ addOption(new stringArraySetting("wheeldown", wheeldown));
- addOption(new ButtonSetting("leftbutton", leftbutton));
- addOption(new ButtonSetting("middlebutton", middlebutton));
- addOption(new ButtonSetting("rightbutton", rightbutton));
- addOption(new ButtonSetting("wheelup", wheelup));
- addOption(new ButtonSetting("wheeldown", wheeldown));
+ addOption(new stringArraySetting("warnings", Warn));
+ addOption(new warnSetting("warn", 0, "string", "Enable warning"));
multiOption *view=new multiOption("View", 'V', "View output");
view->add(new boolSetting("batchView", 0, "View output in batch mode",
@@ -1095,8 +1174,7 @@ void initSettings() {
"Allow write to other directory",
&globaloption, false));
addSecureSetting(new stringSetting("outname", 'o', "name",
- "Alternative output directory/filename",
- ""));
+ "Alternative output directory/filename"));
addOption(new stringOption("cd", 0, "directory", "Set current directory",
&startpath));
@@ -1144,22 +1222,34 @@ void initSettings() {
"Delay before attempting initial pdf reload"
,750000));
addOption(new stringSetting("autoimport", 0, "string",
- "Module to automatically import", ""));
+ "Module to automatically import"));
addOption(new userSetting("command", 'c', "string",
- "Command to autoexecute", ""));
+ "Command to autoexecute"));
addOption(new userSetting("user", 'u', "string",
- "General purpose user string", ""));
+ "General purpose user string"));
+
+ addOption(new realSetting("zoomfactor", 0, "factor", "Zoom step factor",
+ 1.05));
+ addOption(new realSetting("zoomstep", 0, "step", "Mouse motion zoom step",
+ 0.1));
+ addOption(new realSetting("spinstep", 0, "deg/sec", "Spin speed",
+ 60.0));
+ addOption(new realSetting("arcballradius", 0, "pixels",
+ "Arcball radius", 750.0));
+ addOption(new realSetting("resizestep", 0, "step", "Resize step", 1.2));
+ addOption(new realSetting("doubleclick", 0, "ms",
+ "Emulated double-click timeout", 200.0));
addOption(new realSetting("paperwidth", 0, "bp", ""));
addOption(new realSetting("paperheight", 0, "bp", ""));
- addOption(new stringSetting("dvipsOptions", 0, "string", "", ""));
- addOption(new stringSetting("convertOptions", 0, "string", "", ""));
- addOption(new stringSetting("gsOptions", 0, "string", "", ""));
- addOption(new stringSetting("psviewerOptions", 0, "string", "", ""));
- addOption(new stringSetting("pdfviewerOptions", 0, "string", "", ""));
- addOption(new stringSetting("pdfreloadOptions", 0, "string", "", ""));
- addOption(new stringSetting("glOptions", 0, "string", "", ""));
+ addOption(new stringSetting("dvipsOptions", 0, "string", ""));
+ addOption(new stringSetting("convertOptions", 0, "string", ""));
+ addOption(new stringSetting("gsOptions", 0, "string", ""));
+ addOption(new stringSetting("psviewerOptions", 0, "string", ""));
+ addOption(new stringSetting("pdfviewerOptions", 0, "string", ""));
+ addOption(new stringSetting("pdfreloadOptions", 0, "string", ""));
+ addOption(new stringSetting("glOptions", 0, "string", ""));
addOption(new envSetting("config","config."+suffix));
addOption(new envSetting("pdfviewer", defaultPDFViewer));
@@ -1239,8 +1329,9 @@ void initDir() {
if(getSetting<string>("sysdir").empty()) {
string s=lookup("SELFAUTOPARENT");
if(s.size() > 1) {
- docdir=s+dirsep+"texmf"+dirsep+"doc"+dirsep+"asymptote";
- Setting("sysdir")=s+dirsep+"texmf"+dirsep+"asymptote";
+ string texmf=s+dirsep+"texmf"+dirsep;
+ docdir=texmf+"doc"+dirsep+"asymptote";
+ Setting("sysdir")=texmf+"asymptote";
s=lookup("TEXMFCONFIG");
if(s.size() > 1)
initdir=s+dirsep+"asymptote";
diff --git a/Build/source/utils/asymptote/settings.h b/Build/source/utils/asymptote/settings.h
index d4a045ffa12..d5bf0028d52 100644
--- a/Build/source/utils/asymptote/settings.h
+++ b/Build/source/utils/asymptote/settings.h
@@ -44,6 +44,9 @@ extern const char BUGREPORT[];
extern char *argv0;
+void Warn(const string& s);
+void noWarn(const string& s);
+string warn(const string& s);
extern string systemDir;
extern string docdir;
extern const string dirsep;
diff --git a/Build/source/utils/asymptote/stm.cc b/Build/source/utils/asymptote/stm.cc
index 5b09387d431..d55015d7c01 100644
--- a/Build/source/utils/asymptote/stm.cc
+++ b/Build/source/utils/asymptote/stm.cc
@@ -81,12 +81,16 @@ exp *tryToWriteExp(coenv &e, exp *body)
// Issue a warning if the act of writing turns an ambiguous expression
// into an unambiguous one.
if (t->kind == ty_overloaded) {
- em.warning(body->getPos());
- em << "writing overloaded";
- if (body->getName())
- em << " variable '" << *body->getName() << "'";
- else
- em << " expression";
+ string s=settings::warn("writeoverloaded");
+ if(!s.empty()) {
+ em.warning(body->getPos());
+ em << "writing overloaded";
+ if (body->getName())
+ em << " variable '" << *body->getName() << "'";
+ else
+ em << " expression";
+ em.disable(s);
+ }
}
return call;
}
diff --git a/Build/source/utils/asymptote/types.cc b/Build/source/utils/asymptote/types.cc
index 4b288938d79..ddc4a07317a 100644
--- a/Build/source/utils/asymptote/types.cc
+++ b/Build/source/utils/asymptote/types.cc
@@ -105,37 +105,47 @@ trans::varEntry *primitiveTy::virtualField(symbol *id, signature *sig)
#define FIELD(Type, name, func) \
if (sig == 0 && id == symbol::trans(name)) { \
static trans::bltinAccess a(run::func); \
- static trans::varEntry v(prim##Type(), &a, 0, position()); \
+ static trans::varEntry v(Type(), &a, 0, position()); \
return &v; \
}
switch (kind) {
case ty_pair:
- FIELD(Real,"x",pairXPart);
- FIELD(Real,"y",pairYPart);
+ FIELD(primReal,"x",pairXPart);
+ FIELD(primReal,"y",pairYPart);
break;
case ty_triple:
- FIELD(Real,"x",tripleXPart);
- FIELD(Real,"y",tripleYPart);
- FIELD(Real,"z",tripleZPart);
+ FIELD(primReal,"x",tripleXPart);
+ FIELD(primReal,"y",tripleYPart);
+ FIELD(primReal,"z",tripleZPart);
break;
case ty_transform:
- FIELD(Real,"x",transformXPart);
- FIELD(Real,"y",transformYPart);
- FIELD(Real,"xx",transformXXPart);
- FIELD(Real,"xy",transformXYPart);
- FIELD(Real,"yx",transformYXPart);
- FIELD(Real,"yy",transformYYPart);
+ FIELD(primReal,"x",transformXPart);
+ FIELD(primReal,"y",transformYPart);
+ FIELD(primReal,"xx",transformXXPart);
+ FIELD(primReal,"xy",transformXYPart);
+ FIELD(primReal,"yx",transformYXPart);
+ FIELD(primReal,"yy",transformYYPart);
break;
case ty_tensionSpecifier:
- FIELD(Real,"out",tensionSpecifierOutPart);
- FIELD(Real,"in",tensionSpecifierInPart);
- FIELD(Boolean,"atLeast",tensionSpecifierAtleastPart);
+ FIELD(primReal,"out",tensionSpecifierOutPart);
+ FIELD(primReal,"in",tensionSpecifierInPart);
+ FIELD(primBoolean,"atLeast",tensionSpecifierAtleastPart);
break;
case ty_curlSpecifier:
- FIELD(Real,"value",curlSpecifierValuePart);
- FIELD(Int,"side",curlSpecifierSidePart);
+ FIELD(primReal,"value",curlSpecifierValuePart);
+ FIELD(primInt,"side",curlSpecifierSidePart);
break;
+ case ty_file:
+ FIELD(primString,"name",namePart);
+ FIELD(primString,"mode",modePart);
+ FIELD(IntArray,"dimension",dimensionPart);
+ FIELD(primBoolean,"line",lineModePart);
+ FIELD(primBoolean,"csv",csvModePart);
+ FIELD(primBoolean,"word",wordModePart);
+ FIELD(primBoolean,"singlereal",singleRealModePart);
+ FIELD(primBoolean,"singleint",singleIntModePart);
+ FIELD(primBoolean,"signed",signedIntModePart);
default:
break;
}
diff --git a/Build/source/utils/asymptote/util.cc b/Build/source/utils/asymptote/util.cc
index f322f149ae8..ecf6bd272d6 100644
--- a/Build/source/utils/asymptote/util.cc
+++ b/Build/source/utils/asymptote/util.cc
@@ -223,12 +223,12 @@ void execError(const char *command, const char *hint, const char *application)
cerr << "Please put in a file " << getSetting<string>("config")
<< ": " << endl << endl
<< "import settings;" << endl
- << hint << "=\"PATH\";" << endl << endl
- << "where PATH denotes the correct path to "
+ << hint << "=\"LOCATION\";" << endl << endl
+ << "where LOCATION specifies the location of "
<< application << "." << endl << endl
<< "Alternatively, set the environment variable ASYMPTOTE_" << s
<< endl << "or use the command line option -" << hint
- << "=\"PATH\". For further details, see" << endl
+ << "=\"LOCATION\". For further details, see" << endl
<< "http://asymptote.sourceforge.net/doc/Configuring.html" << endl
<< "http://asymptote.sourceforge.net/doc/Search-paths.html" << endl;
}
@@ -378,16 +378,33 @@ void popupHelp() {
}
}
+const char *intrange="integer argument is outside valid range";
+const char *uintrange="integer argument is outside valid unsigned range";
+
unsigned unsignedcast(Int n)
{
if(n < 0 || n/2 > INT_MAX)
- vm::error("Unsigned integer argument is outside valid range");
+ vm::error(uintrange);
return (unsigned) n;
}
+unsignedInt unsignedIntcast(Int n)
+{
+ if(n < 0)
+ vm::error(uintrange);
+ return (unsignedInt) n;
+}
+
int intcast(Int n)
{
if(Abs(n) > INT_MAX)
- vm::error("Integer argument is outside valid range");
+ vm::error(intrange);
return (int) n;
}
+
+Int Intcast(unsignedInt n)
+{
+ if(n > (unsignedInt) Int_MAX)
+ vm::error(intrange);
+ return (Int) n;
+}
diff --git a/Build/source/utils/asymptote/util.h b/Build/source/utils/asymptote/util.h
index 145f9717faf..599d97a61ca 100644
--- a/Build/source/utils/asymptote/util.h
+++ b/Build/source/utils/asymptote/util.h
@@ -122,6 +122,8 @@ inline Int Abs(Int x) {
}
unsigned unsignedcast(Int n);
+unsignedInt unsignedIntcast(Int n);
int intcast(Int n);
-
+Int Intcast(unsignedInt n);
+
#endif
diff --git a/Build/source/utils/asymptote/xstream.h b/Build/source/utils/asymptote/xstream.h
index b1d91fa38cc..c0f335e6133 100644
--- a/Build/source/utils/asymptote/xstream.h
+++ b/Build/source/utils/asymptote/xstream.h
@@ -29,11 +29,13 @@
#include <rpc/types.h>
#define quad_t long long
+#define u_quad_t unsigned long long
#ifdef __CYGWIN__
extern "C" int fseeko(FILE *, off_t, int);
extern "C" off_t ftello(FILE *);
#define xdr_longlong_t xdr_int64_t
+#define xdr_u_longlong_t xdr_uint64_t
#endif
#ifdef _POSIX_SOURCE
@@ -134,8 +136,9 @@ public:
IXSTREAM(int,int);
IXSTREAM(unsigned int,u_int);
IXSTREAM(long,long);
- IXSTREAM(long long,longlong_t);
IXSTREAM(unsigned long,u_long);
+ IXSTREAM(long long,longlong_t);
+ IXSTREAM(unsigned long long,u_longlong_t);
IXSTREAM(short,short);
IXSTREAM(unsigned short,u_short);
IXSTREAM(char,char);
@@ -186,8 +189,9 @@ public:
OXSTREAM(int,int);
OXSTREAM(unsigned int,u_int);
OXSTREAM(long,long);
- OXSTREAM(long long,longlong_t);
OXSTREAM(unsigned long,u_long);
+ OXSTREAM(long long,longlong_t);
+ OXSTREAM(unsigned long long,u_longlong_t);
OXSTREAM(short,short);
OXSTREAM(unsigned short,u_short);
OXSTREAM(char,char);