diff options
author | Karl Berry <karl@freefriends.org> | 2021-01-02 16:31:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-01-02 16:31:31 +0000 |
commit | 6457cd3f6e21e23e21db6dafff021d17f5457567 (patch) | |
tree | 08f169333e47c5fc1c50e828cf3a0f50bdf9b508 /Build/source/utils/asymptote/doc/FAQ | |
parent | dc2504a4c02af0ec2fff00e6b833c6143a06b4cd (diff) |
asy 2.68 sources
git-svn-id: svn://tug.org/texlive/trunk@57291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/doc/FAQ')
-rw-r--r-- | Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn | 46 | ||||
-rw-r--r-- | Build/source/utils/asymptote/doc/FAQ/asy-faq.info | 44 | ||||
-rwxr-xr-x | Build/source/utils/asymptote/doc/FAQ/bfnnconv.pl | 6 | ||||
-rwxr-xr-x | Build/source/utils/asymptote/doc/FAQ/install-sh | 441 | ||||
-rw-r--r-- | Build/source/utils/asymptote/doc/FAQ/m-html.pl | 11 |
5 files changed, 267 insertions, 281 deletions
diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn b/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn index 2d3955af078..a4dc8a0965c 100644 --- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn +++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn @@ -5,11 +5,11 @@ \comment The format and scripts come from the Linux FAQ, by \comment Ian Jackson. \set brieftitle Asymptote FAQ -\set author <A href="http://asymptote.sourceforge.net">Asymptote</A> +\set author <A href="https://asymptote.sourceforge.io">Asymptote</A> \set title Asymptote Frequently Asked Questions \copyto ASCII ASYMPTOTE FREQUENTLY ASKED QUESTIONS - `date '+%d %h %Y'` + `%perl use POSIX; POSIX::strftime("%Y-%m-%d", gmtime($ENV{SOURCE_DATE_EPOCH} || time))` \endcopy \copyto INFO @@ -22,7 +22,7 @@ END-INFO-DIR-ENTRY File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir) ASYMPTOTE FREQUENTLY ASKED QUESTIONS - `date '+%d %h %Y'` + `%perl use POSIX; POSIX::strftime("%Y-%m-%d", gmtime($ENV{SOURCE_DATE_EPOCH} || time))` \endcopy @@ -49,7 +49,7 @@ C++-like syntax. Unlike MetaPost, it natively supports multiple-segment paths Binary releases are available for Linux, MacOS X, and Microsoft Windows platforms, in addition to full source code, from the website -\docref{http://asymptote.sourceforge.net/\}. Many Linux distributions +\docref{https://asymptote.sourceforge.io/\}. Many Linux distributions (such as RedHat and Debian) now include an Asymptote package (check your distribution's documentation for further information about this). @@ -57,7 +57,7 @@ distribution's documentation for further information about this). If you have a question, please try to find an answer in this FAQ, in the extensive Asymptote documentation at -\docref{http://asymptote.sourceforge.net/doc/\}, or search the forum: +\docref{https://asymptote.sourceforge.io/doc/\}, or search the forum: \docref{http://sourceforge.net/forum/forum.php?forum_id=409349\}. \question 02sep:whyasy Why was the name Asymptote chosen? @@ -97,7 +97,7 @@ official source: \question 04nov:brokenpdftex What do I do if I get the error: \courier{Error: pdfetex (file pdftex.cfg): cannot open config file...texinfo.tex appears to be broken\}? -Simply put \docref{http://asymptote.sourceforge.net/asymptote.pdf\} +Simply put \docref{https://asymptote.sourceforge.io/asymptote.pdf\} in the directory \courier{doc\} and repeat the command \courier{make all\}. Or, if you don't want to build a local copy of the documentation, simply proceed with \courier{make install-asy\}. @@ -113,7 +113,7 @@ guide on the topic. You can download it from \docref{http://dario.dse.nl/projects/asylatex/\}. Philippe Ivaldi has contributed an Asymptote mode for Emacs users -\docref{http://asymptote.sourceforge.net/doc/Editing-modes.html\}, +\docref{https://asymptote.sourceforge.io/doc/Editing-modes.html\}, which includes a \courier{lasy-mode\} that allows one to compile and view the output of one \\begin{asy}...\\end{asy} section at a time. @@ -279,7 +279,7 @@ defaultpen(TimesRoman()); \question 28jun:internatfonts How can I use international fonts in Asymptote labels? -See \docref{http://asymptote.sourceforge.net/doc/unicode.html\}. +See \docref{https://asymptote.sourceforge.io/doc/Pens.html\}. \question 10jul:Fourier How can I use Fourier fonts? @@ -321,7 +321,7 @@ draw(rotate(90,project(Z))*"A",O--X); \question 02sep:fixedsize How can I draw some squares and circles of a fixed size and put a label in the middle of them? Fixed-size objects should be drawn on a separate picture and then added to -currentpicture. Here is one way (see also \docref{http://asymptote.sourceforge.net/gallery/subpictures.asy\} and \docref{http://asymptote.sourceforge.net/gallery/mosquito.asy\}): +currentpicture. Here is one way (see also \docref{https://asymptote.sourceforge.io/gallery/subpictures.asy\} and \docref{https://asymptote.sourceforge.io/gallery/mosquito.asy\}): \verbatim real u=2cm; @@ -594,7 +594,7 @@ label. Other possible overwrite arguments are Allow (allows overlapping labels; the default), Suppress (an overlapping label will not be written at all), SuppressQuiet, and MoveQuiet. The last two achieve the same result as the non-quiet types, but will not notify you which labels are overlapping. See: -\docref{http://asymptote.sourceforge.net/doc/Pens.html\}. +\docref{https://asymptote.sourceforge.io/doc/Pens.html\}. In the case of a user-specified tick array, you can change which labels get suppressed/moved by changing the order of array entries. @@ -645,7 +645,7 @@ have the same scaling and same resulting figure size (just ensure the two coordinates given to \courier{fixedscaling()\} leaves room for any labels). See also -\docref{http://asymptote.sourceforge.net/doc/Frames-and-pictures.html\}. +\docref{https://asymptote.sourceforge.io/doc/Frames-and-pictures.html\}. \question 26jun:graphlimits How can I plot a function f(x) within [0,1]x[0,2] without explicitly calculating the x values for which f(x) hits the boundary? @@ -663,7 +663,7 @@ xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks); \endverbatim -See also \docref{http://asymptote.sourceforge.net/doc/graph.html\}. +See also \docref{https://asymptote.sourceforge.io/doc/graph.html\}. \question 26jun:custompalettes Is it possible to define customized palettes? @@ -745,12 +745,12 @@ distance(A,B,"$\ell$",1); \question 26jun:log2 How can I make the y axis display base-2 logarithmic values? -See the example \docref{http://asymptote.sourceforge.net/gallery/2D graphs/log2graph.asy\}. +See the example \docref{https://asymptote.sourceforge.io/gallery/2D graphs/log2graph.asy\}. \question 27jun:align How can I align the x axes of two graphs on the same figure? An easy way to do this, if the axes to be aligned have the same scaling -and size, is illustrated in the example \docref{http://asymptote.sourceforge.net/gallery/2D graphs/alignedaxis.asy\}. +and size, is illustrated in the example \docref{https://asymptote.sourceforge.io/gallery/2D graphs/alignedaxis.asy\}. Here is a more general solution to the problem of aligning two arbitrary axes. One fits the second picture to a frame based on the horizontal scaling for @@ -813,7 +813,7 @@ add(shift(0,-height)*(shift(shift)*pic2).fit(T)); \question 27jun:changeaxis How can I change the direction of the y-axis, such that negatives values are on the upper y-axis? -Here is a simple example (see also the example \docref{http://asymptote.sourceforge.net/gallery/2D graphs/diatom.asy\} or the discussion +Here is a simple example (see also the example \docref{https://asymptote.sourceforge.io/gallery/2D graphs/diatom.asy\} or the discussion of Linear(-1) in the documentation): \verbatim @@ -847,7 +847,7 @@ y=t x=(t-2)^2+1 \endverbatim -See the example \docref{http://asymptote.sourceforge.net/gallery/2D graphs/parametricgraph.asy\}. +See the example \docref{https://asymptote.sourceforge.io/gallery/2D graphs/parametricgraph.asy\}. \question 27jun:scalesecondaryaxis Is it possible to reverse or stretch an axis? @@ -1037,7 +1037,7 @@ at least until the end of the file or prompt's run. Yes, Asymptote includes a line-based debugger: -\docref{http://asymptote.sourceforge.net/doc/Debugger.html\} +\docref{https://asymptote.sourceforge.io/doc/Debugger.html\} \question 27jun:patches Do you accept patches for Asymptote? @@ -1065,7 +1065,7 @@ distinguishes between true-size objects and objects that should scale with the picture size. The resulting linear programming problem is solved via the Simplex method. -See the \docref{http://asymptote.sourceforge.net/gallery/dimension.asy\} example for an example of how deferred drawing is +See the \docref{https://asymptote.sourceforge.io/gallery/dimension.asy\} example for an example of how deferred drawing is used to accomodate both user and true-size (PostScript) coordinates. \question 02sep:manualscaling How can I avoid automatic scaling of a picture? @@ -1116,7 +1116,7 @@ this returns the intersection point of the extensions of the line segments could be persuaded to add something similar if someone can justify the need. In the meantime, one can always use the explicit built-in linear solver \courier{solve\} (see -\docref{http://asymptote.sourceforge.net/doc/solve.html\}), which uses LU +\docref{https://asymptote.sourceforge.io/doc/solve.html\}), which uses LU decomposition. \question 23jun:lray What is the equivalent for the MetaPost command for \courier{lray - horiz*v - verti*u = whatever*(LightSource - R)\}, a system of three linear equations for three unknowns: \courier{horiz, verti, whatever\}? @@ -1212,7 +1212,7 @@ clip(100,100); \endverbatim See also the discussion of tilings in the documentation: -\docref{http://asymptote.sourceforge.net/doc/Pens.html\}. +\docref{https://asymptote.sourceforge.io/doc/Pens.html\}. \comment ###################################################################### @@ -1232,7 +1232,7 @@ batchView=false; \endverbatim in their \courier{config.asy\} file. See -\docref{http://asymptote.sourceforge.net/doc/Options.html\}. +\docref{https://asymptote.sourceforge.io/doc/Options.html\}. \question 26jun:jpeg How do I output jpeg images? @@ -1251,8 +1251,8 @@ Label: label(graphic("file"),(0,0)); \endverbatim -See the example \docref{http://asymptote.sourceforge.net/gallery/orthocenter.asy\} and -\docref{http://asymptote.sourceforge.net/doc/label.html\}. +See the example \docref{https://asymptote.sourceforge.io/gallery/orthocenter.asy\} and +\docref{https://asymptote.sourceforge.io/doc/label.html\}. \question 28jun:directpdf Does Asymptote support direct PDF output? diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info index 94a02e1e38a..bef48f5f9bc 100644 --- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info +++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info @@ -10,7 +10,7 @@ END-INFO-DIR-ENTRY File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir) ASYMPTOTE FREQUENTLY ASKED QUESTIONS - 25 Mar 2020 + 2020-11-23 This is the list of Frequently Asked Questions about Asymptote (asy). @@ -223,7 +223,7 @@ Question 1.2. How do I obtain Asymptote? Binary releases are available for Linux, MacOS X, and Microsoft Windows platforms, in addition to full source code, from the website -http://asymptote.sourceforge.net/. Many Linux distributions (such as +https://asymptote.sourceforge.io/. Many Linux distributions (such as RedHat and Debian) now include an Asymptote package (check your distribution's documentation for further information about this). @@ -234,7 +234,7 @@ Question 1.3. Where can I ask questions about Asymptote? If you have a question, please try to find an answer in this FAQ, in the extensive Asymptote documentation at -http://asymptote.sourceforge.net/doc/, or search the forum: +https://asymptote.sourceforge.io/doc/, or search the forum: http://sourceforge.net/forum/forum.php?forum_id=409349. @@ -316,7 +316,7 @@ File: asy-faq.info, Node: Question 2.3, Next: Question 2.4, Previous: Question 2 Question 2.3. What do I do if I get the error: Error: pdfetex (file pdftex.cfg): cannot open config file...texinfo.tex appears to be broken? -Simply put http://asymptote.sourceforge.net/asymptote.pdf in the directory +Simply put https://asymptote.sourceforge.io/asymptote.pdf in the directory doc and repeat the command make all. Or, if you don't want to build a local copy of the documentation, simply proceed with make install-asy. @@ -340,7 +340,7 @@ detailed guide on the topic. You can download it from http://dario.dse.nl/projects/asylatex/. Philippe Ivaldi has contributed an Asymptote mode for Emacs users -http://asymptote.sourceforge.net/doc/Editing-modes.html, which includes a +https://asymptote.sourceforge.io/doc/Editing-modes.html, which includes a lasy-mode that allows one to compile and view the output of one \begin{asy}...\end{asy} section at a time. @@ -541,7 +541,7 @@ File: asy-faq.info, Node: Question 4.4, Next: Question 4.5, Previous: Question 4 Question 4.4. How can I use international fonts in Asymptote labels? -See http://asymptote.sourceforge.net/doc/unicode.html. +See https://asymptote.sourceforge.io/doc/Pens.html. File: asy-faq.info, Node: Question 4.5, Next: Question 4.6, Previous: Question 4.4, Up: Section 4 @@ -586,8 +586,8 @@ Question 4.9. How can I draw some squares and circles of a fixed size and put a Fixed-size objects should be drawn on a separate picture and then added to currentpicture. Here is one way (see also -http://asymptote.sourceforge.net/gallery/subpictures.asy and -http://asymptote.sourceforge.net/gallery/mosquito.asy): +https://asymptote.sourceforge.io/gallery/subpictures.asy and +https://asymptote.sourceforge.io/gallery/mosquito.asy): real u=2cm; @@ -904,7 +904,7 @@ label. Other possible overwrite arguments are Allow (allows overlapping labels; the default), Suppress (an overlapping label will not be written at all), SuppressQuiet, and MoveQuiet. The last two achieve the same result as the non-quiet types, but will not notify you which labels are -overlapping. See: http://asymptote.sourceforge.net/doc/Pens.html. +overlapping. See: https://asymptote.sourceforge.io/doc/Pens.html. In the case of a user-specified tick array, you can change which labels get suppressed/moved by changing the order of array entries. @@ -948,7 +948,7 @@ corner. You can use this option to ensure multiple figures have the same scaling and same resulting figure size (just ensure the two coordinates given to fixedscaling() leaves room for any labels). -See also http://asymptote.sourceforge.net/doc/Frames-and-pictures.html. +See also https://asymptote.sourceforge.io/doc/Frames-and-pictures.html. File: asy-faq.info, Node: Question 6.9, Next: Question 6.10, Previous: Question 6.8, Up: Section 6 @@ -966,7 +966,7 @@ limits((0,0),(1,2),Crop); xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks); -See also http://asymptote.sourceforge.net/doc/graph.html. +See also https://asymptote.sourceforge.io/doc/graph.html. File: asy-faq.info, Node: Question 6.10, Next: Question 6.11, Previous: Question 6.9, Up: Section 6 @@ -1051,7 +1051,7 @@ File: asy-faq.info, Node: Question 6.13, Next: Question 6.14, Previous: Question Question 6.13. How can I make the y axis display base-2 logarithmic values? -See the example http://asymptote.sourceforge.net/gallery/2D +See the example https://asymptote.sourceforge.io/gallery/2D graphs/log2graph.asy. @@ -1061,7 +1061,7 @@ Question 6.14. How can I align the x axes of two graphs on the same figure? An easy way to do this, if the axes to be aligned have the same scaling and size, is illustrated in the example -http://asymptote.sourceforge.net/gallery/2D graphs/alignedaxis.asy. +https://asymptote.sourceforge.io/gallery/2D graphs/alignedaxis.asy. Here is a more general solution to the problem of aligning two arbitrary axes. One fits the second picture to a frame based on the horizontal @@ -1125,7 +1125,7 @@ File: asy-faq.info, Node: Question 6.15, Next: Question 6.16, Previous: Question Question 6.15. How can I change the direction of the y-axis, such that negatives values are on the upper y-axis? Here is a simple example (see also the example -http://asymptote.sourceforge.net/gallery/2D graphs/diatom.asy or the +https://asymptote.sourceforge.io/gallery/2D graphs/diatom.asy or the discussion of Linear(-1) in the documentation): import graph; @@ -1159,7 +1159,7 @@ Yes, use the parametric form y=t x=(t-2)^2+1 -See the example http://asymptote.sourceforge.net/gallery/2D +See the example https://asymptote.sourceforge.io/gallery/2D graphs/parametricgraph.asy. @@ -1382,7 +1382,7 @@ Question 7.8. Is there a debugger for asy? Yes, Asymptote includes a line-based debugger: -http://asymptote.sourceforge.net/doc/Debugger.html +https://asymptote.sourceforge.io/doc/Debugger.html File: asy-faq.info, Node: Question 7.9, Next: Question 8.1, Previous: Question 7.8, Up: Section 7 @@ -1441,7 +1441,7 @@ pictures and distinguishes between true-size objects and objects that should scale with the picture size. The resulting linear programming problem is solved via the Simplex method. -See the http://asymptote.sourceforge.net/gallery/dimension.asy example for +See the https://asymptote.sourceforge.io/gallery/dimension.asy example for an example of how deferred drawing is used to accomodate both user and true-size (PostScript) coordinates. @@ -1495,7 +1495,7 @@ PQ and pq. We find using routines like extension more explicit and less confusing to new users. But we could be persuaded to add something similar if someone can justify the need. In the meantime, one can always use the explicit built-in linear solver solve (see -http://asymptote.sourceforge.net/doc/solve.html), which uses LU +https://asymptote.sourceforge.io/doc/solve.html), which uses LU decomposition. @@ -1578,7 +1578,7 @@ void clip(picture pic=currentpicture, real width, real height) clip(100,100); See also the discussion of tilings in the documentation: -http://asymptote.sourceforge.net/doc/Pens.html. +https://asymptote.sourceforge.io/doc/Pens.html. File: asy-faq.info, Node: Section 9, Previous: Section 8, Up: Top @@ -1612,7 +1612,7 @@ import settings; interactiveView=false; batchView=false; in their config.asy file. See -http://asymptote.sourceforge.net/doc/Options.html. +https://asymptote.sourceforge.io/doc/Options.html. File: asy-faq.info, Node: Question 9.2, Next: Question 9.3, Previous: Question 9.1, Up: Section 9 @@ -1631,8 +1631,8 @@ Convert them to eps format and use the graphic(string) function just like a Label: label(graphic("file"),(0,0)); -See the example http://asymptote.sourceforge.net/gallery/orthocenter.asy -and http://asymptote.sourceforge.net/doc/label.html. +See the example https://asymptote.sourceforge.io/gallery/orthocenter.asy +and https://asymptote.sourceforge.io/doc/label.html. File: asy-faq.info, Node: Question 9.4, Next: Question 9.5, Previous: Question 9.3, Up: Section 9 diff --git a/Build/source/utils/asymptote/doc/FAQ/bfnnconv.pl b/Build/source/utils/asymptote/doc/FAQ/bfnnconv.pl index 0a705e2c68f..35a636b55e5 100755 --- a/Build/source/utils/asymptote/doc/FAQ/bfnnconv.pl +++ b/Build/source/utils/asymptote/doc/FAQ/bfnnconv.pl @@ -135,7 +135,11 @@ while (<>) { m/([^\\])\`/ || warn "`$_'"; $_= $'; $cmd= $`.$1; - $it= `$cmd`; chop $it; + if($cmd =~ s/^%perl //) { + $it= eval($cmd); + } else { + $it= `$cmd`; chop $it; + } print $fh $it; } print $fh $_; diff --git a/Build/source/utils/asymptote/doc/FAQ/install-sh b/Build/source/utils/asymptote/doc/FAQ/install-sh index ec298b53740..6781b987bdb 100755 --- a/Build/source/utils/asymptote/doc/FAQ/install-sh +++ b/Build/source/utils/asymptote/doc/FAQ/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2020-11-14.01; # UTC +scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,21 +35,25 @@ scriptversion=2020-11-14.01; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it +# `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. -tab=' ' nl=' ' -IFS=" $tab$nl" +IFS=" "" $nl" -# Set DOITPROG to "echo" to test this script. +# set DOITPROG to echo to test this script +# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -doit_exec=${doit:-exec} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -64,16 +68,22 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + posix_mkdir= # Desired mode of installed file. mode=0755 -# Create dirs (including intermediate dirs) using mode 755. -# This is like GNU 'install' as of coreutils 8.32 (2020). -mkdir_umask=22 - -backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -87,7 +97,7 @@ dir_arg= dst_arg= copy_on_change=false -is_target_a_directory=possibly +no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -104,28 +114,18 @@ Options: --version display version info and exit. -c (ignored) - -C install only if different (preserve data modification time) + -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. - -p pass -p to $cpprog. -s $stripprog installed files. - -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG - -By default, rm is invoked with -f; when overridden with RMPROG, -it's up to you to specify -f if you want it. - -If -S is not specified, no backups are attempted. - -Email bug reports to bug-automake@gnu.org. -Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,62 +137,42 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; - - -p) cpprog="$cpprog -p";; + shift;; -s) stripcmd=$stripprog;; - -S) backupsuffix="$2" - shift;; - - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) dst_arg=$2 + shift;; - -T) is_target_a_directory=never;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. - -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi - if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -206,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac done fi @@ -218,26 +194,13 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call 'install-sh -d' without argument. + # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 + trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -248,16 +211,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -265,9 +228,9 @@ fi for src do - # Protect names problematic for 'test' and other utilities. + # Protect names starting with `-'. case $src in - -* | [=\(\)!]) src=./$src;; + -*) src=./$src;; esac if test -n "$dir_arg"; then @@ -275,10 +238,6 @@ do dstdir=$dst test -d "$dstdir" dstdir_status=$? - # Don't chown directories that already exist. - if test $dstdir_status = 0; then - chowncmd="" - fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -293,150 +252,185 @@ do echo "$0: no destination specified." >&2 exit 1 fi + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac - # If destination is a directory, append the input filename. + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst - dstbase=`basename "$src"` - case $dst in - */) dst=$dst$dstbase;; - *) dst=$dst/$dstbase;; - esac + dst=$dstdir/`basename "$src"` dstdir_status=0 else - dstdir=`dirname "$dst"` + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + test -d "$dstdir" dstdir_status=$? fi fi - case $dstdir in - */) dstdirslash=$dstdir;; - *) dstdirslash=$dstdir/;; - esac - obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - # The $RANDOM variable is not portable (e.g., dash). Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap ' - ret=$? - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null - exit $ret - ' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p'. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + mkdir_mode= fi - trap '' 0;; + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else - # mkdir does not conform to POSIX, + # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; esac + eval "$initialize_posix_glob" + oIFS=$IFS IFS=/ - set -f + $posix_glob set -f set fnord $dstdir shift - set +f + $posix_glob set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -449,25 +443,14 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=${dstdirslash}_inst.$$_ - rmtmp=${dstdirslash}_rm.$$_ + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && - { test -z "$stripcmd" || { - # Create $dsttmp read-write so that cp doesn't create it read-only, - # which would cause strip to fail. - if test -z "$doit"; then - : >"$dsttmp" # No need to fork-exec 'touch'. - else - $doit touch "$dsttmp" - fi - } - } && - $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -482,24 +465,20 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - set +f && + $posix_glob set +f && + test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else - # If $backupsuffix is set, and the file being installed - # already exists, attempt a backup. Don't worry if it fails, - # e.g., if mv doesn't support -f. - if test -n "$backupsuffix" && test -f "$dst"; then - $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null - fi - # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -507,24 +486,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 @@ -533,9 +512,9 @@ do done # Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" +# time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: diff --git a/Build/source/utils/asymptote/doc/FAQ/m-html.pl b/Build/source/utils/asymptote/doc/FAQ/m-html.pl index 75b8ccc38f7..77cc2575040 100644 --- a/Build/source/utils/asymptote/doc/FAQ/m-html.pl +++ b/Build/source/utils/asymptote/doc/FAQ/m-html.pl @@ -22,6 +22,8 @@ # by the GPL. However, I would appreciate it if you credited me if # appropriate in any documents you format using BFNN.) +use POSIX; + %saniarray= ('<','lt', '>','gt', '&','amp', '"','quot'); sub html_init { @@ -34,8 +36,9 @@ sub html_init { print HTML "<html>\n"; $html_needpara= -1; $html_end=''; - chop($html_date=`date '+%d %B %Y'`); - chop($html_year=`date '+%Y'`); + my $epoch=$ENV{SOURCE_DATE_EPOCH} || time; + $html_date=POSIX::strftime("%Y-%m-%d", gmtime($epoch)); + $html_year=POSIX::strftime("%Y", gmtime($epoch)); } sub html_startup { @@ -50,9 +53,9 @@ $user_title content="Frequently asked questions and answers (FAQ) for Asymptote."> <link rel="Bookmark" title="Asymptote FAQ" href="index.html"> <LINK rel="Bookmark" title="Asymptote Home Page" - href="http://asymptote.sourceforge.net"> + href="https://asymptote.sourceforge.io"> <LINK rel="Bookmark" title="Asymptote Manual" - href="http://asymptote.sourceforge.net/doc/"> + href="https://asymptote.sourceforge.io/doc/"> </head><body text="#000000" bgcolor="#FFFFFF"><h1> $user_title </h1> |