summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-03-15 16:19:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-03-15 16:19:23 +0000
commit1387c757017435ac53dd62cf5e9a20e7c178a473 (patch)
tree7db0686a31244d9c3dd06bf38927e7b71c5a2123
parentReleasing progress-linux version 3.4.3-1~dschinn1. (diff)
downloadr-base-1387c757017435ac53dd62cf5e9a20e7c178a473.zip
r-base-1387c757017435ac53dd62cf5e9a20e7c178a473.tar.xz
Merging upstream version 3.4.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--SVN-REVISION4
-rw-r--r--VERSION2
-rw-r--r--VERSION-NICK2
-rwxr-xr-xconfigure45
-rw-r--r--configure.ac17
-rw-r--r--doc/COPYRIGHTS6
-rw-r--r--doc/NEWS61
-rw-r--r--doc/NEWS.2.Rd10
-rw-r--r--doc/NEWS.Rd75
-rw-r--r--doc/NEWS.pdfbin499141 -> 502414 bytes
-rw-r--r--doc/html/NEWS.html106
-rw-r--r--doc/html/R-admin.html747
-rw-r--r--doc/manual/R-admin.texi419
-rw-r--r--doc/manual/R-defs.texi2
-rw-r--r--doc/manual/R-exts.texi363
-rw-r--r--doc/manual/R-intro.texi2
-rw-r--r--doc/manual/R-ints.texi7
-rw-r--r--m4/R.m414
-rw-r--r--share/texmf/bibtex/bib/RJournal.bib982
-rw-r--r--src/extra/tzone/Make.zi2
-rw-r--r--src/extra/tzone/Notes4
-rw-r--r--src/extra/tzone/zoneinfo.zipbin414625 -> 414677 bytes
-rw-r--r--src/gnuwin32/CHANGES.Rd2
-rw-r--r--src/gnuwin32/front-ends/Rfe.c7
-rw-r--r--src/gnuwin32/front-ends/rcmdfn.c21
-rw-r--r--src/include/Rmath.h0.in3
l---------src/library/Recommended/MASS.tgz2
-rw-r--r--src/library/Recommended/MASS_7.3-47.tar.gzbin487707 -> 0 bytes
-rw-r--r--src/library/Recommended/MASS_7.3-49.tar.gzbin0 -> 487770 bytes
-rw-r--r--src/library/Recommended/Matrix_1.2-12.tar.gzbin1821424 -> 1821418 bytes
l---------src/library/Recommended/mgcv.tgz2
-rw-r--r--src/library/Recommended/mgcv_1.8-22.tar.gzbin859949 -> 0 bytes
-rw-r--r--src/library/Recommended/mgcv_1.8-23.tar.gzbin0 -> 866068 bytes
l---------src/library/Recommended/nlme.tgz2
-rw-r--r--src/library/Recommended/nlme_3.1-131.1.tar.gzbin0 -> 780392 bytes
-rw-r--r--src/library/Recommended/nlme_3.1-131.tar.gzbin780607 -> 0 bytes
l---------src/library/Recommended/rpart.tgz2
-rw-r--r--src/library/Recommended/rpart_4.1-11.tar.gzbin819684 -> 0 bytes
-rw-r--r--src/library/Recommended/rpart_4.1-13.tar.gzbin0 -> 818294 bytes
-rw-r--r--src/library/base/R/conditions.R13
-rw-r--r--src/library/base/R/datetime.R172
-rw-r--r--src/library/base/R/windows/system.R10
-rw-r--r--src/library/base/man/CallExternal.Rd6
-rw-r--r--src/library/base/man/Comparison.Rd2
-rw-r--r--src/library/base/man/Extract.Rd4
-rw-r--r--src/library/base/man/Log.Rd2
-rw-r--r--src/library/base/man/Logic.Rd2
-rw-r--r--src/library/base/man/LongVectors.Rd2
-rw-r--r--src/library/base/man/NA.Rd2
-rw-r--r--src/library/base/man/Special.Rd2
-rw-r--r--src/library/base/man/Sys.localeconv.Rd2
-rw-r--r--src/library/base/man/c.Rd2
-rw-r--r--src/library/base/man/cbind.Rd2
-rw-r--r--src/library/base/man/chartr.Rd2
-rw-r--r--src/library/base/man/chkDots.Rd2
-rw-r--r--src/library/base/man/chol.Rd2
-rw-r--r--src/library/base/man/connections.Rd2
-rw-r--r--src/library/base/man/dput.Rd2
-rw-r--r--src/library/base/man/dynload.Rd22
-rw-r--r--src/library/base/man/factor.Rd2
-rw-r--r--src/library/base/man/files.Rd13
-rw-r--r--src/library/base/man/format.Rd2
-rw-r--r--src/library/base/man/formatc.Rd2
-rw-r--r--src/library/base/man/funprog.Rd2
-rw-r--r--src/library/base/man/grep.Rd2
-rw-r--r--src/library/base/man/labels.Rd2
-rw-r--r--src/library/base/man/library.Rd2
-rw-r--r--src/library/base/man/locales.Rd2
-rw-r--r--src/library/base/man/matrix.Rd2
-rw-r--r--src/library/base/man/merge.Rd2
-rw-r--r--src/library/base/man/ns-load.Rd2
-rw-r--r--src/library/base/man/paste.Rd2
-rw-r--r--src/library/base/man/readLines.Rd2
-rw-r--r--src/library/base/man/regex.Rd8
-rw-r--r--src/library/base/man/seq.POSIXt.Rd6
-rw-r--r--src/library/base/man/source.Rd4
-rw-r--r--src/library/base/man/substr.Rd2
-rw-r--r--src/library/base/man/system.Rd2
-rw-r--r--src/library/base/man/timezones.Rd139
-rw-r--r--src/library/base/man/toString.Rd2
-rw-r--r--src/library/base/man/trace.Rd60
-rw-r--r--src/library/datasets/man/ToothGrowth.Rd2
-rw-r--r--src/library/grDevices/man/colorRamp.Rd2
-rw-r--r--src/library/grDevices/man/dev.Rd2
-rw-r--r--src/library/grDevices/man/grSoftVersion.Rd21
-rw-r--r--src/library/grDevices/man/postscript.Rd2
-rw-r--r--src/library/grDevices/man/unix/savePlot.Rd14
-rw-r--r--src/library/grDevices/man/unix/x11.Rd2
-rw-r--r--src/library/grDevices/man/windows/savePlot.Rd10
-rw-r--r--src/library/grDevices/man/windows/windows.options.Rd2
-rw-r--r--src/library/grDevices/tests/ps-tests.Rout.save6
-rw-r--r--src/library/grDevices/tests/xfig-tests.Rout.save6
-rw-r--r--src/library/graphics/man/mosaicplot.Rd2
-rw-r--r--src/library/graphics/man/plot.dataframe.Rd2
-rw-r--r--src/library/graphics/man/plot.raster.Rd4
-rw-r--r--src/library/graphics/man/rasterImage.Rd2
-rw-r--r--src/library/graphics/man/rect.Rd2
-rw-r--r--src/library/grid/inst/doc/displaylist.pdfbin157837 -> 157209 bytes
-rw-r--r--src/library/grid/inst/doc/frame.pdfbin156425 -> 155828 bytes
-rw-r--r--src/library/grid/inst/doc/grid.pdfbin251989 -> 251717 bytes
-rw-r--r--src/library/grid/inst/doc/grobs.pdfbin107598 -> 106986 bytes
-rw-r--r--src/library/grid/inst/doc/interactive.pdfbin91310 -> 90681 bytes
-rw-r--r--src/library/grid/inst/doc/locndimn.pdfbin89964 -> 89340 bytes
-rw-r--r--src/library/grid/inst/doc/moveline.pdfbin87707 -> 87093 bytes
-rw-r--r--src/library/grid/inst/doc/nonfinite.pdfbin79944 -> 79328 bytes
-rw-r--r--src/library/grid/inst/doc/plotexample.pdfbin224240 -> 223327 bytes
-rw-r--r--src/library/grid/inst/doc/rotated.pdfbin122343 -> 121612 bytes
-rw-r--r--src/library/grid/inst/doc/saveload.pdfbin134320 -> 133706 bytes
-rw-r--r--src/library/grid/inst/doc/sharing.pdfbin71278 -> 70649 bytes
-rw-r--r--src/library/grid/inst/doc/viewports.pdfbin163484 -> 162857 bytes
-rw-r--r--src/library/grid/man/drawDetails.Rd2
-rw-r--r--src/library/grid/man/grid.convert.Rd2
-rw-r--r--src/library/grid/man/makeContent.Rd2
-rw-r--r--src/library/grid/man/stringWidth.Rd2
-rw-r--r--src/library/grid/tests/testls.Rout.save6
-rw-r--r--src/library/methods/man/MethodsList-class.Rd2
-rw-r--r--src/library/methods/man/RMethodUtils.Rd2
-rw-r--r--src/library/methods/man/StructureClasses.Rd2
-rw-r--r--src/library/methods/man/nonStructure-class.Rd2
-rw-r--r--src/library/methods/man/refClass.Rd2
-rw-r--r--src/library/methods/man/validObject.Rd2
-rw-r--r--src/library/parallel/R/detectCores.R6
-rw-r--r--src/library/parallel/inst/doc/parallel.pdfbin291155 -> 290944 bytes
-rw-r--r--src/library/parallel/man/detectCores.Rd14
-rw-r--r--src/library/parallel/tests/multicore2.Rout.save6
-rw-r--r--src/library/parallel/tests/snow2.Rout.save6
-rw-r--r--src/library/stats/R/distn.R6
-rw-r--r--src/library/stats/R/nls.R31
-rw-r--r--src/library/stats/R/power.R26
-rw-r--r--src/library/stats/man/Beta.Rd2
-rw-r--r--src/library/stats/man/Chisquare.Rd2
-rw-r--r--src/library/stats/man/Fdist.Rd2
-rw-r--r--src/library/stats/man/GammaDist.Rd2
-rw-r--r--src/library/stats/man/KalmanLike.Rd2
-rw-r--r--src/library/stats/man/NLSstAsymptotic.Rd2
-rw-r--r--src/library/stats/man/anova.mlm.Rd2
-rw-r--r--src/library/stats/man/bandwidth.Rd2
-rw-r--r--src/library/stats/man/box.test.Rd2
-rw-r--r--src/library/stats/man/dendrapply.Rd2
-rw-r--r--src/library/stats/man/family.Rd2
-rw-r--r--src/library/stats/man/kernel.Rd2
-rw-r--r--src/library/stats/man/lag.plot.Rd2
-rw-r--r--src/library/stats/man/line.Rd3
-rw-r--r--src/library/stats/man/lmfit.Rd2
-rw-r--r--src/library/stats/man/monthplot.Rd2
-rw-r--r--src/library/stats/man/plot.lm.Rd2
-rw-r--r--src/library/stats/man/plot.ppr.Rd2
-rw-r--r--src/library/stats/man/power.prop.test.Rd32
-rw-r--r--src/library/stats/man/predict.lm.Rd2
-rw-r--r--src/library/stats/man/reorder.dendrogram.Rd2
-rw-r--r--src/library/stats/man/spec.taper.Rd2
-rw-r--r--src/library/stats/tests/bandwidth.Rout.save6
-rw-r--r--src/library/stats/tests/glm.Rout.save6
-rw-r--r--src/library/stats/tests/ks-test.Rout.save6
-rw-r--r--src/library/stats/tests/nls.R36
-rw-r--r--src/library/stats/tests/nls.Rout.save46
-rw-r--r--src/library/stats/tests/simulate.Rout.save6
-rw-r--r--src/library/stats/tests/smooth.spline.R3
-rw-r--r--src/library/tools/R/admin.R13
-rw-r--r--src/library/tools/R/build.R18
-rw-r--r--src/library/tools/R/check.R22
-rw-r--r--src/library/tools/R/install.R5
-rw-r--r--src/library/tools/R/sotools.R20
-rw-r--r--src/library/tools/R/testing.R2
-rw-r--r--src/library/tools/R/utils.R4
-rw-r--r--src/library/tools/man/Rd2txt_options.Rd2
-rw-r--r--src/library/tools/man/checkRdaFiles.Rd7
-rw-r--r--src/library/tools/man/vignetteDepends.Rd2
-rw-r--r--src/library/tools/man/writePACKAGES.Rd4
-rw-r--r--src/library/tools/src/gramLatex.c861
-rw-r--r--src/library/tools/src/gramRd.c1453
-rw-r--r--src/library/utils/R/sourceutils.R20
-rw-r--r--src/library/utils/inst/doc/Sweave.pdfbin322552 -> 321938 bytes
-rw-r--r--src/library/utils/man/INSTALL.Rd2
-rw-r--r--src/library/utils/man/Question.Rd2
-rw-r--r--src/library/utils/man/adist.Rd2
-rw-r--r--src/library/utils/man/format.Rd2
-rw-r--r--src/library/utils/man/help.Rd2
-rw-r--r--src/library/utils/man/news.Rd2
-rw-r--r--src/library/utils/man/rcompgen.Rd4
-rw-r--r--src/library/utils/man/relist.Rd2
-rw-r--r--src/main/character.c4
-rw-r--r--src/main/connections.c8
-rw-r--r--src/main/deparse.c7
-rw-r--r--src/main/errors.c43
-rw-r--r--src/main/eval.c10
-rw-r--r--src/main/gram.c1218
-rw-r--r--src/main/print.c10
-rw-r--r--src/main/printutils.c7
-rw-r--r--src/main/seq.c8
-rw-r--r--src/main/summary.c75
-rw-r--r--src/main/util.c13
-rw-r--r--src/modules/X11/dataentry.c2
-rw-r--r--src/modules/lapack/Lapack.c2
-rw-r--r--src/modules/lapack/README4
-rw-r--r--src/modules/lapack/cmplx.f53
-rw-r--r--src/modules/lapack/dlapack.f177
-rw-r--r--src/scripts/BATCH4
-rw-r--r--src/scripts/COMPILE4
-rw-r--r--src/scripts/LINK4
-rw-r--r--src/scripts/config6
-rw-r--r--src/scripts/javareconf.in4
-rw-r--r--tests/Examples/datasets-Ex.Rout.save6
-rw-r--r--tests/Examples/grDevices-Ex.Rout.save6
-rw-r--r--tests/Examples/graphics-Ex.Rout.save12
-rw-r--r--tests/Examples/grid-Ex.Rout.save6
-rw-r--r--tests/Examples/splines-Ex.Rout.save6
-rw-r--r--tests/Examples/stats-Ex.Rout.save59
-rw-r--r--tests/Examples/stats4-Ex.Rout.save6
-rw-r--r--tests/Examples/tools-Ex.Rout.save8
-rw-r--r--tests/R-intro.Rout.save4
-rw-r--r--tests/any-all.Rout.save4
-rw-r--r--tests/arith-true.Rout.save6
-rw-r--r--tests/arith.Rout.save4
-rw-r--r--tests/complex.Rout.save4
-rw-r--r--tests/d-p-q-r-tests.R10
-rw-r--r--tests/d-p-q-r-tests.Rout.save16
-rw-r--r--tests/datasets.Rout.save4
-rw-r--r--tests/datetime.Rout.save4
-rw-r--r--tests/datetime2.Rout.save4
-rw-r--r--tests/demos.Rout.save6
-rw-r--r--tests/eval-etc.Rout.save4
-rw-r--r--tests/iec60559.Rout.save4
-rw-r--r--tests/internet.Rout.save6
-rw-r--r--tests/isas-tests.Rout.save6
-rw-r--r--tests/lapack.Rout.save4
-rw-r--r--tests/lm-tests.Rout.save4
-rw-r--r--tests/method-dispatch.Rout.save4
-rw-r--r--tests/ok-errors.Rout.save4
-rw-r--r--tests/p-r-random-tests.Rout.save6
-rw-r--r--tests/print-tests.Rout.save4
-rw-r--r--tests/reg-IO.Rout.save4
-rw-r--r--tests/reg-IO2.Rout.save4
-rw-r--r--tests/reg-S4.Rout.save4
-rw-r--r--tests/reg-examples3.Rout.save4
-rw-r--r--tests/reg-tests-1d.R6
-rw-r--r--tests/reg-tests-2.Rout.save16
-rw-r--r--tests/reg-tests-3.Rout.save4
-rw-r--r--tests/simple-true.Rout.save4
239 files changed, 4705 insertions, 3490 deletions
diff --git a/SVN-REVISION b/SVN-REVISION
index 2937f4c..8842b33 100644
--- a/SVN-REVISION
+++ b/SVN-REVISION
@@ -1,2 +1,2 @@
-Revision: 73796
-Last Changed Date: 2017-11-30
+Revision: 74408
+Last Changed Date: 2018-03-15
diff --git a/VERSION b/VERSION
index 6cb9d3d..f989260 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.4.3
+3.4.4
diff --git a/VERSION-NICK b/VERSION-NICK
index 214bdec..48e53dd 100644
--- a/VERSION-NICK
+++ b/VERSION-NICK
@@ -1 +1 @@
-Kite-Eating Tree
+Someone to Lean On
diff --git a/configure b/configure
index caa8cc3..a314719 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for R 3.4.3.
+# Generated by GNU Autoconf 2.69 for R 3.4.4.
#
# Report bugs to <https://bugs.r-project.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='R'
PACKAGE_TARNAME='R'
-PACKAGE_VERSION='3.4.3'
-PACKAGE_STRING='R 3.4.3'
+PACKAGE_VERSION='3.4.4'
+PACKAGE_STRING='R 3.4.4'
PACKAGE_BUGREPORT='https://bugs.r-project.org'
PACKAGE_URL='https://www.r-project.org'
@@ -1703,7 +1703,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 R 3.4.3 to adapt to many kinds of systems.
+\`configure' configures R 3.4.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1778,7 +1778,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of R 3.4.3:";;
+ short | recursive ) echo "Configuration of R 3.4.4:";;
esac
cat <<\_ACEOF
@@ -2065,7 +2065,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-R configure 3.4.3
+R configure 3.4.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3217,7 +3217,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 R $as_me 3.4.3, which was
+It was created by R $as_me 3.4.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -27662,6 +27662,7 @@ if test "${GCC}" = yes; then
esac
shlib_ldflags="-shared"
fi
+## G77 includes gfortran
if test "${G77}" = yes; then
case "${host_cpu}" in
sparc*|ppc64*|powerpc64*|s390*)
@@ -27672,6 +27673,12 @@ if test "${G77}" = yes; then
;;
esac
fi
+## Assume flang is the same as clang (it is a modified front end)
+case "${F77}" in
+ *flang)
+ fpicflags=${cpicflags}
+ ;;
+esac
if test "${GXX}" = yes; then
case "${host_cpu}" in
sparc*|ppc64*|powerpc64*|s390*)
@@ -27891,6 +27898,7 @@ $as_echo "$as_me: WARNING: Use of flat namespace is requested by user." >&2;}
if test "${GCC}" = yes; then
cpicflags="-fPIC"
fi
+ ## G77 includes gfortran
if test "${G77}" = yes; then
fpicflags="-fPIC"
fi
@@ -27928,7 +27936,7 @@ $as_echo "$as_me: WARNING: Use of flat namespace is requested by user." >&2;}
fi
fi
fi
- ## G77 include gfortran
+ ## G77 includes gfortran
if test "${G77}" != yes; then
fpicflags="-PIC"
else
@@ -35677,6 +35685,10 @@ if test "$ac_res" != no; then :
fi
+## -lnsl is needed on Solaris
+## 2018: Sun RPC is being unbundled from glibc, at least in Fedora 28
+## (https://fedoraproject.org/wiki/Changes/SunRPCRemoval)
+## Use libtirpc instead, which has been a possible source since ca 2007
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing xdr_string" >&5
$as_echo_n "checking for library containing xdr_string... " >&6; }
if ${ac_cv_search_xdr_string+:} false; then :
@@ -41109,11 +41121,11 @@ BITMAP_CPPFLAGS=
BITMAP_LIBS=
if test "${use_jpeglib}" = yes; then
save_CPPFLAGS=${CPPFLAGS}
- ## jpeglib does not support pkg-config, although some OSes add it.
- ## This is untested.
- if "${PKGCONF}" --exists jpeg; then
- JPG_CPPFLAGS=`"${PKGCONF}" --cflags jpeg`
- JPG_LIBS=`"${PKGCONF}" --libs jpeg`
+ ## IJG version 9c (Jan 2018) has support as libjpeg.
+ ## libjpeg-turbo has had this for a while.
+ if "${PKGCONF}" --exists libjpeg; then
+ JPG_CPPFLAGS=`"${PKGCONF}" --cflags libjpeg`
+ JPG_LIBS=`"${PKGCONF}" --libs libjpeg`
CPPFLAGS="${CPPFLAGS} ${JPG_CPPFLAGS}"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if jpeglib version >= 6b" >&5
@@ -46274,6 +46286,9 @@ case "${host_os}" in
*pgf95|*pgf90)
fcpicflags="-fpic"
;;
+ *flang)
+ fcpicflags=${cpicflags}
+ ;;
esac
;;
solaris*)
@@ -51362,7 +51377,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by R $as_me 3.4.3, which was
+This file was extended by R $as_me 3.4.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -51429,7 +51444,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-R config.status 3.4.3
+R config.status 3.4.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index f34744d..330d79a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1233,6 +1233,7 @@ if test "${GCC}" = yes; then
esac
shlib_ldflags="-shared"
fi
+## G77 includes gfortran
if test "${G77}" = yes; then
case "${host_cpu}" in
sparc*|ppc64*|powerpc64*|s390*)
@@ -1243,6 +1244,12 @@ if test "${G77}" = yes; then
;;
esac
fi
+## Assume flang is the same as clang (it is a modified front end)
+case "${F77}" in
+ *flang)
+ fpicflags=${cpicflags}
+ ;;
+esac
if test "${GXX}" = yes; then
case "${host_cpu}" in
sparc*|ppc64*|powerpc64*|s390*)
@@ -1452,6 +1459,7 @@ rm -f libconftest${DYLIB_EXT} conftest.c
if test "${GCC}" = yes; then
cpicflags="-fPIC"
fi
+ ## G77 includes gfortran
if test "${G77}" = yes; then
fpicflags="-fPIC"
fi
@@ -1489,7 +1497,7 @@ rm -f libconftest${DYLIB_EXT} conftest.c
fi
fi
fi
- ## G77 include gfortran
+ ## G77 includes gfortran
if test "${G77}" != yes; then
fpicflags="-PIC"
else
@@ -1995,6 +2003,10 @@ AC_CHECK_DECLS([mkdtemp, strdup, strncasecmp])
AC_SEARCH_LIBS(connect, [socket])
# gethostbyname was removed in POSIX 2008 (in favour of getaddrinfo, POSIX 2001)
AC_SEARCH_LIBS(gethostbyname, [nsl socket])
+## -lnsl is needed on Solaris
+## 2018: Sun RPC is being unbundled from glibc, at least in Fedora 28
+## (https://fedoraproject.org/wiki/Changes/SunRPCRemoval)
+## Use libtirpc instead, which has been a possible source since ca 2007
AC_SEARCH_LIBS(xdr_string, [nsl tirpc])
R_FUNC_CALLOC
if test "${ac_cv_have_decl_isfinite}" = "yes"; then
@@ -2515,6 +2527,9 @@ case "${host_os}" in
*pgf95|*pgf90)
fcpicflags="-fpic"
;;
+ *flang)
+ fcpicflags=${cpicflags}
+ ;;
esac
;;
solaris*)
diff --git a/doc/COPYRIGHTS b/doc/COPYRIGHTS
index 2510dc9..3f97cde 100644
--- a/doc/COPYRIGHTS
+++ b/doc/COPYRIGHTS
@@ -286,16 +286,16 @@ THE SOFTWARE.
src/modules/lapack/dlapack.f, cmplx.f, dlamc.f
Extracted from
- * -- LAPACK computational routine (version 3.7.1) --
+ * -- LAPACK computational routine (version 3.8.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
- * June 2017
+ * November 2017
where the version number, providers and date vary by subroutine.
For version 3.7.0, many of the copyright dates were updated
even for routines which have not been changed for years.
- LAPACK 3.7.1 contains a LICENSE file, copied to src/modules/lapack
+ LAPACK 3.8.0 contains a LICENSE file, copied to src/modules/lapack
(but many of these routines were originally copied from earlier
versions of LAPACK). For binary distributions it is reproduced here:
diff --git a/doc/NEWS b/doc/NEWS
index 199cb20..911cc88 100644
--- a/doc/NEWS
+++ b/doc/NEWS
@@ -1,5 +1,62 @@
R News
+CHANGES IN R 3.4.4:
+
+ NEW FEATURES:
+
+ * Sys.timezone() tries more heuristics on Unix-alikes and so is
+ more likely to succeed (especially on Linux). For the slowest
+ method, a warning is given recommending that TZ is set to avoid
+ the search.
+
+ * The version of LAPACK included in the sources has been updated to
+ 3.8.0 (for the routines used by R, a very minor bug-fix change).
+
+ * parallel::detectCores(logical = FALSE) is ignored on Linux
+ systems, since the information is not available with virtualized
+ OSes.
+
+ INSTALLATION on a UNIX-ALIKE:
+
+ * configure will use pkg-config to find the flags to link to jpeg
+ if available (as it should be for the recently-released jpeg-9c
+ and libjpeg-turbo). (This amends the code added in R 3.3.0 as
+ the module name in jpeg-9c is not what that tested for.)
+
+ DEPRECATED AND DEFUNCT:
+
+ * Sys.timezone(location = FALSE) (which was a stop-gap measure for
+ Windows long ago) is deprecated. It no longer returns the value
+ of environment variable TZ (usually a location).
+
+ * Legacy support of make macros such as CXX1X is formally
+ deprecated: use the CXX11 forms instead.
+
+ BUG FIXES:
+
+ * power.prop.test() now warns when it cannot solve the problem,
+ typically because of impossible constraints. (PR#17345)
+
+ * removeSource() no longer erroneously removes NULL in certain
+ cases, thanks to D'enes T'oth.
+
+ * nls(`NO [mol/l]` ~ f(t)) and nls(y ~ a) now work. (Partly from
+ PR#17367)
+
+ * R CMD build checks for GNU cp rather than assuming Linux has it.
+ (PR#17370 says 'Alpine Linux' does not.)
+
+ * Non-UTF-8 multibyte character handling fixed more permanently
+ (PR#16732).
+
+ * sum(<large ints>, <stuff>) is more consistent. (PR#17372)
+
+ * rf() and rbeta() now also work correctly when ncp is not scalar,
+ notably when (partly) NA. (PR#17375)
+
+ * R CMD INSTALL now correctly sets C++ compiler flags when all
+ source files are in sub-directories of src.
+
CHANGES IN R 3.4.3:
INSTALLATION on a UNIX-ALIKE:
@@ -682,7 +739,7 @@ CHANGES IN R 3.4.0:
* An alternative compiler for C++11 is now specified with CXX11,
not CXX1X. Likewise C++11 flags are specified with CXX11FLAGS and
- the standard (e.g., -std=gnu++11 is specified with CXX11STD.
+ the standard (e.g., -std=gnu++11) is specified with CXX11STD.
* configure now tests for a C++14-compliant compiler by testing
some basic features. This by default tries flags for the
@@ -2257,7 +2314,7 @@ CHANGES IN R 3.2.2:
* polym() gains a coefs = NULL argument and returns class "poly"
just like poly() which gets a new simple=FALSE option. They now
lead to correct predict()ions, e.g., on subsets of the original
- data.
+ data. (PR#16239)
* rhyper(nn, <large>) now works correctly. (PR#16489)
diff --git a/doc/NEWS.2.Rd b/doc/NEWS.2.Rd
index 93dfcc3..c1bb2fc 100644
--- a/doc/NEWS.2.Rd
+++ b/doc/NEWS.2.Rd
@@ -468,7 +468,7 @@
In interactive use it will ask whether to choose the source
version of a package if the binary version is older and contains
compiled code, and also asks if source packages with no binary
- version should be installed).
+ version should be installed.
}
}
@@ -682,7 +682,7 @@
\sQuote{spectral} or 2-norm) as well, mainly for didactical
completeness.
- \item \code{pmin()} and \code{pmax())} now also work when one of
+ \item \code{pmin()} and \code{pmax()} now also work when one of
the inputs is of length zero and others are not, returning a
zero-length vector, analogously to, say, \code{+}.
@@ -941,7 +941,7 @@
active could abort the \R process.
\item \code{getMethod(f, sig)} produced an incorrect error message
- in some cases when \code{f} was not a string).
+ in some cases when \code{f} was not a string.
\item Using a string as a \dQuote{call} in an error condition
with \code{options(showErrorCalls=TRUE)} could cause a segfault.
@@ -1674,7 +1674,7 @@
\item \code{tools::deparseLatex(dropBraces=TRUE)} could drop
text as well as braces.
- \item \code{colormodel = "grey"} (new in \R 2.14.0))
+ \item \code{colormodel = "grey"} (new in \R 2.14.0)
did not always work in \code{postscript()} and \code{pdf()}.
\item \code{file.append()} could return \code{TRUE} for failures.
@@ -4465,7 +4465,7 @@
It avoids the use of \command{texindy} by \command{texinfo}'s
\command{texi2dvi >= 1.157}, since that does not emulate
'makeindex' well enough to avoid problems with special characters
- (such as \samp{(}, \samp{\{}, \samp{!}) in indices.
+ (such as \samp{(}, \samp{\{}, \samp{!}) in indices. % )
\item The ability of \code{readLines()} and \code{scan()} to
re-encode inputs to marked UTF-8 strings on Windows since \R 2.7.0
diff --git a/doc/NEWS.Rd b/doc/NEWS.Rd
index e703475..de06f92 100644
--- a/doc/NEWS.Rd
+++ b/doc/NEWS.Rd
@@ -5,6 +5,77 @@
\title{R News}
\encoding{UTF-8}
+\section{\Rlogo CHANGES IN R 3.4.4}{
+
+ \subsection{NEW FEATURES}{
+ \itemize{
+ \item \code{Sys.timezone()} tries more heuristics on Unix-alikes and so
+ is more likely to succeed (especially on Linux). For the slowest
+ method, a warning is given recommending that \env{TZ} is set to
+ avoid the search.
+
+ \item The version of LAPACK included in the sources has been
+ updated to 3.8.0 (for the routines used by \R, a very minor bug-fix
+ change).
+
+ \item \code{parallel::detectCores(logical = FALSE)} is ignored on
+ Linux systems, since the information is not available with
+ virtualized OSes.
+ }
+ }
+
+ \subsection{INSTALLATION on a UNIX-ALIKE}{
+ \itemize{
+ \item \command{configure} will use \command{pkg-config} to find the
+ flags to link to \code{jpeg} if available (as it should be for the
+ recently-released \code{jpeg-9c} and \code{libjpeg-turbo}). (This
+ amends the code added in \R 3.3.0 as the module name in
+ \code{jpeg-9c} is not what that tested for.)
+ }
+ }
+
+ \subsection{DEPRECATED AND DEFUNCT}{
+ \itemize{
+ \item \code{Sys.timezone(location = FALSE)} (which was a stop-gap
+ measure for Windows long ago) is deprecated. It no longer returns
+ the value of environment variable \env{TZ} (usually a location).
+
+ \item Legacy support of \command{make} macros such as \samp{CXX1X}
+ is formally deprecated: use the \samp{CXX11} forms instead.
+ }
+ }
+
+ \subsection{BUG FIXES}{
+ \itemize{
+ \item \code{power.prop.test()} now warns when it cannot solve the
+ problem, typically because of impossible constraints. (\PR{17345})
+
+ \item \code{removeSource()} no longer erroneously removes
+ \code{NULL} in certain cases, thanks to Dénes Tóth.
+
+ \item \code{nls(`NO [mol/l]` ~ f(t))} and \code{nls(y ~ a)} now
+ work. (Partly from \PR{17367})
+
+ \item \command{R CMD build} checks for GNU \command{cp} rather
+ than assuming Linux has it. (\PR{17370} says \sQuote{Alpine
+ Linux} does not.)
+
+ \item Non-UTF-8 multibyte character handling fixed more
+ permanently (\PR{16732}).
+
+ \item \code{sum(<large ints>, <stuff>)} is more consistent.
+ (\PR{17372})
+
+ \item \code{rf()} and \code{rbeta()} now also work correctly when
+ \code{ncp} is not scalar, notably when (partly) \code{NA}.
+ (\PR{17375})
+
+ \item \command{R CMD INSTALL} now correctly sets C++ compiler flags
+ when all source files are in sub-directories of \file{src}.
+ }
+ }
+}
+
\section{\Rlogo CHANGES IN R 3.4.3}{
\subsection{INSTALLATION on a UNIX-ALIKE}{
@@ -762,7 +833,7 @@
\item An alternative compiler for C++11 is now specified with
\samp{CXX11}, not \samp{CXX1X}. Likewise C++11 flags are specified
- with \samp{CXX11FLAGS} and the standard (e.g., \samp{-std=gnu++11}
+ with \samp{CXX11FLAGS} and the standard (e.g., \samp{-std=gnu++11})
is specified with \samp{CXX11STD}.
\item \command{configure} now tests for a C++14-compliant compiler
@@ -2551,7 +2622,7 @@
returns class \code{"poly"} just like \code{poly()} which gets a
new \code{simple=FALSE} option. They now lead to correct
\code{predict()}ions, e.g., on subsets of the original data.
- %% see https://stat.ethz.ch/pipermail/r-devel/2015-July/071532.html
+ (\PR{16239})
\item \code{rhyper(nn, <large>)} now works correctly. (\PR{16489})
diff --git a/doc/NEWS.pdf b/doc/NEWS.pdf
index 25e1196..f5656e9 100644
--- a/doc/NEWS.pdf
+++ b/doc/NEWS.pdf
Binary files differ
diff --git a/doc/html/NEWS.html b/doc/html/NEWS.html
index 0a6872b..3fbb5a1 100644
--- a/doc/html/NEWS.html
+++ b/doc/html/NEWS.html
@@ -7,6 +7,108 @@
<h2>R News</h2>
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.4.4</h3>
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li> <p><code>Sys.timezone()</code> tries more heuristics on Unix-alikes and so
+is more likely to succeed (especially on Linux). For the slowest
+method, a warning is given recommending that <span class="env">TZ</span> is set to
+avoid the search.
+</p>
+</li>
+<li><p> The version of LAPACK included in the sources has been
+updated to 3.8.0 (for the routines used by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, a very minor bug-fix
+change).
+</p>
+</li>
+<li> <p><code>parallel::detectCores(logical = FALSE)</code> is ignored on
+Linux systems, since the information is not available with
+virtualized OSes.
+</p>
+</li></ul>
+
+
+
+
+<h4>INSTALLATION on a UNIX-ALIKE</h4>
+
+
+<ul>
+<li> <p><code>configure</code> will use <code>pkg-config</code> to find the
+flags to link to <code>jpeg</code> if available (as it should be for the
+recently-released <code>jpeg-9c</code> and <code>libjpeg-turbo</code>). (This
+amends the code added in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.3.0 as the module name in
+<code>jpeg-9c</code> is not what that tested for.)
+</p>
+</li></ul>
+
+
+
+
+<h4>DEPRECATED AND DEFUNCT</h4>
+
+
+<ul>
+<li> <p><code>Sys.timezone(location = FALSE)</code> (which was a stop-gap
+measure for Windows long ago) is deprecated. It no longer returns
+the value of environment variable <span class="env">TZ</span> (usually a location).
+</p>
+</li>
+<li><p> Legacy support of <code>make</code> macros such as <span class="samp">CXX1X</span>
+is formally deprecated: use the <span class="samp">CXX11</span> forms instead.
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li> <p><code>power.prop.test()</code> now warns when it cannot solve the
+problem, typically because of impossible constraints. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17345">PR#17345</a>)
+</p>
+</li>
+<li> <p><code>removeSource()</code> no longer erroneously removes
+<code>NULL</code> in certain cases, thanks to Dénes Tóth.
+</p>
+</li>
+<li> <p><code>nls(`NO [mol/l]` ~ f(t))</code> and <code>nls(y ~ a)</code> now
+work. (Partly from <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17367">PR#17367</a>)
+</p>
+</li>
+<li> <p><code>R CMD build</code> checks for GNU <code>cp</code> rather
+than assuming Linux has it. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17370">PR#17370</a> says &lsquo;Alpine
+Linux&rsquo; does not.)
+</p>
+</li>
+<li><p> Non-UTF-8 multibyte character handling fixed more
+permanently (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16732">PR#16732</a>).
+</p>
+</li>
+<li> <p><code>sum(&lt;large ints&gt;, &lt;stuff&gt;)</code> is more consistent.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17372">PR#17372</a>)
+</p>
+</li>
+<li> <p><code>rf()</code> and <code>rbeta()</code> now also work correctly when
+<code>ncp</code> is not scalar, notably when (partly) <code>NA</code>.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17375">PR#17375</a>)
+</p>
+</li>
+<li> <p><code>R CMD INSTALL</code> now correctly sets C++ compiler flags
+when all source files are in sub-directories of &lsquo;<span class="file">src</span>&rsquo;.
+</p>
+</li></ul>
+
+
+
+
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.4.3</h3>
@@ -963,7 +1065,7 @@ the same behaviour on Linux distributions with long-term support.
</li>
<li><p> An alternative compiler for C++11 is now specified with
<span class="samp">CXX11</span>, not <span class="samp">CXX1X</span>. Likewise C++11 flags are specified
-with <span class="samp">CXX11FLAGS</span> and the standard (e.g., <span class="samp">-std=gnu++11</span>
+with <span class="samp">CXX11FLAGS</span> and the standard (e.g., <span class="samp">-std=gnu++11</span>)
is specified with <span class="samp">CXX11STD</span>.
</p>
</li>
@@ -3299,7 +3401,7 @@ environment.
returns class <code>"poly"</code> just like <code>poly()</code> which gets a
new <code>simple=FALSE</code> option. They now lead to correct
<code>predict()</code>ions, e.g., on subsets of the original data.
-
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16239">PR#16239</a>)
</p>
</li>
<li> <p><code>rhyper(nn, &lt;large&gt;)</code> now works correctly. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16489">PR#16489</a>)
diff --git a/doc/html/R-admin.html b/doc/html/R-admin.html
index abbbdb5..7f3cc33 100644
--- a/doc/html/R-admin.html
+++ b/doc/html/R-admin.html
@@ -1,8 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- This manual is for R, version 3.4.3 (2017-11-30).
+<!-- This manual is for R, version 3.4.4 (2018-03-15).
-Copyright (C) 2001-2016 R Core Team
+Copyright (C) 2001-2018 R Core Team
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -260,9 +260,9 @@ p {
<li><a name="toc-BLAS-1" href="#BLAS">A.3.1 BLAS</a>
<ul class="no-bullet">
<li><a name="toc-ATLAS-1" href="#ATLAS">A.3.1.1 ATLAS</a></li>
- <li><a name="toc-ACML-1" href="#ACML">A.3.1.2 ACML</a></li>
- <li><a name="toc-Goto-and-OpenBLAS-1" href="#Goto-and-OpenBLAS">A.3.1.3 Goto and OpenBLAS</a></li>
- <li><a name="toc-Intel-MKL" href="#MKL">A.3.1.4 Intel MKL</a></li>
+ <li><a name="toc-Goto-and-OpenBLAS-1" href="#Goto-and-OpenBLAS">A.3.1.2 Goto and OpenBLAS</a></li>
+ <li><a name="toc-Intel-MKL" href="#MKL">A.3.1.3 Intel MKL</a></li>
+ <li><a name="toc-ACML-1" href="#ACML">A.3.1.4 ACML</a></li>
<li><a name="toc-Shared-BLAS-1" href="#Shared-BLAS">A.3.1.5 Shared BLAS</a></li>
</ul></li>
<li><a name="toc-LAPACK-1" href="#LAPACK">A.3.2 LAPACK</a></li>
@@ -333,9 +333,9 @@ p {
<p>This is a guide to installation and administration for R.
</p>
-<p>This manual is for R, version 3.4.3 (2017-11-30).
+<p>This manual is for R, version 3.4.4 (2018-03-15).
</p>
-<p>Copyright &copy; 2001&ndash;2016 R Core Team
+<p>Copyright &copy; 2001&ndash;2018 R Core Team
</p>
<blockquote>
<p>Permission is granted to make and distribute verbatim copies of this
@@ -927,13 +927,13 @@ specified on the <code>make install</code> command line (at least for
<code>libdir</code>. The C header files can be installed to the value of
<code>rincludedir</code>: note that as the headers are not installed into a
subdirectory you probably want something like
-<code>rincludedir=/usr/local/include/R-3.4.3</code>.
+<code>rincludedir=/usr/local/include/R-3.4.4</code>.
</p>
<p>If you want the R home to be something other than
<samp><var>libdir</var>/R</samp>, use <samp>rhome</samp>: for example
</p>
<div class="example">
-<pre class="example">make install rhome=/usr/local/lib64/R-3.4.3
+<pre class="example">make install rhome=/usr/local/lib64/R-3.4.4
</pre></div>
<p>will use a version-specific R home on a non-Debian Linux 64-bit
@@ -1176,9 +1176,12 @@ preferred where there are issues with the system implementation, usually
involving times after 2037 or before 1916. An alternative time-zone
directory<a name="DOCF10" href="#FOOT10"><sup>10</sup></a> can be used, pointed
to by environment variable <code>TZDIR</code>: this should contain files such
-as <samp>Europe/London</samp>. On all tested OSes the system timezone was
+as <samp>Europe/London</samp>. On most OSes the system timezone was
deduced correctly, but if necessary it can be set as the value of
-environment variable <code>TZ</code>.
+environment variable <code>TZ</code>. (OSes which do not follow the
+documentation of <samp>/etc/localtime</samp> as a symbolic link will have
+problems: this includes recent Debian-based Linuxen and RHEL/Centos 6
+(but not 7).)
</p>
@@ -1188,8 +1191,8 @@ environment variable <code>TZ</code>.
<h4 class="subsection">2.7.1 OpenMP Support</h4>
<p>By default <code>configure</code> searches for suitable
-options<a name="DOCF11" href="#FOOT11"><sup>11</sup></a> for OpenMP support for the C, C++98, FORTRAN 77 and
-Fortran compilers.
+options<a name="DOCF11" href="#FOOT11"><sup>11</sup></a> for OpenMP support for the C, C++98, FORTRAN 77 and Fortran
+compilers.
</p>
<p>Only the C result is currently used for R itself, and only if
<code>MAIN_LD</code>/<code>DYLIB_LD</code> were not specified. This can be
@@ -1210,11 +1213,12 @@ SHLIB_OPENMP_FFLAGS
</pre></div>
<p>Setting to an empty value will disable OpenMP for that compiler (and
-configuring with <samp>--disable-openmp</samp> will disable all detection of
-OpenMP). The <code>configure</code> detection test is to compile and link
-a standalone OpenMP program, which is not the same as compiling a shared
-object and loading it into the C program of R&rsquo;s executable. Note
-that overridden values are not tested.
+configuring with <samp>--disable-openmp</samp> will disable all
+detection<a name="DOCF12" href="#FOOT12"><sup>12</sup></a> of OpenMP). The
+<code>configure</code> detection test is to compile and link a standalone
+OpenMP program, which is not the same as compiling a shared object and
+loading it into the C program of R&rsquo;s executable. Note that
+overridden values are not tested.
</p>
<hr>
<a name="C_002b_002b-Support"></a>
@@ -1254,7 +1258,7 @@ CXX17PICFLAGS
<code>configure</code> will attempt to set the rest suitably, choosing for
<code>CXX11STD</code> a suitable flag such as <samp>-std=c++11</samp> for C++11
support. Similarly, configure will if possible choose for
-<code>CXX14STD</code> a flag<a name="DOCF12" href="#FOOT12"><sup>12</sup></a> such as <samp>-std=c++14</samp> for C++14 support and
+<code>CXX14STD</code> a flag<a name="DOCF13" href="#FOOT13"><sup>13</sup></a> such as <samp>-std=c++14</samp> for C++14 support and
<samp>-std=c++1z</samp> for support for the forthcoming C++17 standard. The
inferred values can be overridden in file <samp>config.site</samp> or on the
<code>configure</code> command line: user-supplied values will be tested
@@ -1263,11 +1267,11 @@ compiling some C++11/14/17 code.
<p>R versions 3.1.0 to 3.3.3 used <code>CXX1X</code> rather than <code>CXX11</code>,
and these forms are deprecated but still accepted.
</p>
-<p>It may be<a name="DOCF13" href="#FOOT13"><sup>13</sup></a> that there is no suitable flag for C++11 support, in which
+<p>It may be<a name="DOCF14" href="#FOOT14"><sup>14</sup></a> that there is no suitable flag for C++11 support, in which
case a different compiler could be selected for <code>CXX11</code> and its
corresponding flags. Likewise, a different compiler can be specified for
C++14 support with <code>CXX14</code> and for C++17 support with <code>CXX17</code>.
-Some compilers<a name="DOCF14" href="#FOOT14"><sup>14</sup></a> by default assume
+Some compilers<a name="DOCF15" href="#FOOT15"><sup>15</sup></a> by default assume
a later standard than C++98 whereas the latter is assumed by some
packages. So users of GCC 6 might like to specify
</p><div class="example">
@@ -1288,7 +1292,7 @@ Solaris: c++03 c++11 c++14 (from 12.5)
</pre></div>
<p>(Those for <code>clang++</code> are not documented, but seem to be based on
<code>g++</code>.) Versions 4.3.x to 4.8.x of <code>g++</code> accepted flag
-<samp>-std=c++0x</samp> with partial support<a name="DOCF15" href="#FOOT15"><sup>15</sup></a> for
+<samp>-std=c++0x</samp> with partial support<a name="DOCF16" href="#FOOT16"><sup>16</sup></a> for
C++11: this is currently still accepted as a deprecated synonym for
<samp>-std=c++11</samp>. (At least for versions 4.8.x it has sufficient
support to be picked by <code>configure</code>.) Option
@@ -1407,7 +1411,7 @@ conversion to short name equivalents (a.k.a. DOS 8.3 names), then R
<em>must</em> be installed in a path that does not contain spaces.
</p>
<p>Installation is <em>via</em> the installer
-<samp>R-3.4.3-win.exe</samp>. Just double-click on the icon and
+<samp>R-3.4.4-win.exe</samp>. Just double-click on the icon and
follow the instructions. When installing on a 64-bit version of Windows
the options will include 32- or 64-bit versions of R (and the default is
to install both). You can uninstall R from the Control Panel.
@@ -1474,12 +1478,12 @@ will call this directory <samp><var>R_HOME</var></samp> below.
<p>You need to collect the following sets of files:
</p><ul>
-<li> Get the R source code tarball <samp>R-3.4.3.tar.gz</samp> from
+<li> Get the R source code tarball <samp>R-3.4.4.tar.gz</samp> from
<acronym>CRAN</acronym>. Open a command window (or another shell) at directory
<var>R_HOME</var>, and run
<div class="example">
-<pre class="example">tar -xf R-3.4.3.tar.gz
+<pre class="example">tar -xf R-3.4.4.tar.gz
</pre></div>
<p>to create the source tree in <var>R_HOME</var>. <strong>Beware</strong>: do use
@@ -1488,7 +1492,7 @@ If you are using an account with administrative privileges you may get a
lot of messages which can be suppressed by
</p>
<div class="example">
-<pre class="example">tar --no-same-owner -xf R-3.4.3.tar.gz
+<pre class="example">tar --no-same-owner -xf R-3.4.4.tar.gz
</pre></div>
<a name="index-TAR_005fOPTIONS-1"></a>
@@ -1736,7 +1740,7 @@ describe settings to build them. (Copy that file to
<samp>MkRules.local</samp> and edit it.) The <strong>texinfo</strong> 5.x package for
use on Windows is available at
<a href="https://www.stats.ox.ac.uk/pub/Rtools/">https://www.stats.ox.ac.uk/pub/Rtools/</a>: you will also need to
-install <code>Perl</code><a name="DOCF16" href="#FOOT16"><sup>16</sup></a>
+install <code>Perl</code><a name="DOCF17" href="#FOOT17"><sup>17</sup></a>
</p>
<hr>
<a name="Building-the-Inno-Setup-installer"></a>
@@ -1803,7 +1807,7 @@ source tree) in <samp>src/gnuwin32/installer</samp> run
installation (in double quotes if it contains spaces or backslashes).
</p>
<p>Both methods create an executable with a standard name such as
-<samp>R-3.4.3-win.exe</samp>, so please rename it to indicate that
+<samp>R-3.4.4-win.exe</samp>, so please rename it to indicate that
it is customized. If you intend to <em>distribute</em> a customized
installer please do check that license requirements are met &ndash; note that
the installer will state that the contents are distributed under GPL
@@ -1862,21 +1866,21 @@ make msi
</pre></div>
<p>which will result in a file with a name like
-<samp>R-3.4.3-win32.msi</samp>. This can be double-clicked to be
+<samp>R-3.4.4-win32.msi</samp>. This can be double-clicked to be
installed, but those who need it will know what to do with it (usually
by running <code>msiexec /i</code> with additional options). Properties
that users might want to set from the <code>msiexec</code> command line
include &lsquo;<samp>ALLUSERS</samp>&rsquo;, &lsquo;<samp>INSTALLDIR</samp>&rsquo; (something like
-<samp>c:\Program Files\R\R-3.4.3</samp>) and &lsquo;<samp>RMENU</samp>&rsquo; (the path
+<samp>c:\Program Files\R\R-3.4.4</samp>) and &lsquo;<samp>RMENU</samp>&rsquo; (the path
to the &lsquo;<samp>R</samp>&rsquo; folder on the start menu) and &lsquo;<samp>STARTDIR</samp>&rsquo; (the
starting directory for R shortcuts, defaulting to something like
<samp>c:\Users\name\Documents\R</samp>).
</p>
<p>The MSI installer can be built both from a 32-bit build of R
-(<samp>R-3.4.3-win32.msi</samp>) and from a 64-bit build of R
-(<samp>R-3.4.3-win64.msi</samp>, optionally including 32-bit files
+(<samp>R-3.4.4-win32.msi</samp>) and from a 64-bit build of R
+(<samp>R-3.4.4-win64.msi</samp>, optionally including 32-bit files
by setting the macro <code>HOME32</code>, when the name is
-<samp>R-3.4.3-win.msi</samp>). Unlike the main installer, a 64-bit
+<samp>R-3.4.4-win.msi</samp>). Unlike the main installer, a 64-bit
MSI installer can only be run on 64-bit Windows.
</p>
<p>Thanks to David del Campo (Dept of Statistics, University of Oxford)
@@ -1946,7 +1950,7 @@ Windows&rsquo; CRLF line endings.
<p>(&lsquo;macOS&rsquo; was known as &lsquo;OS X&rsquo; from 2012&ndash;2016 and as &lsquo;Mac OS X&rsquo; before that.)
</p>
<p>The front page of a <acronym>CRAN</acronym> site has a link &lsquo;Download R for OS
-X&rsquo;. Click on that, then download the file <samp>R-3.4.3.pkg</samp>
+X&rsquo;. Click on that, then download the file <samp>R-3.4.4.pkg</samp>
and install it. This runs on macOS 10.11 and later (El Capitan, Sierra,
High Sierra, &hellip;).
</p>
@@ -2011,7 +2015,7 @@ can be viewed from <small>R.APP</small>&rsquo;s &lsquo;Help&rsquo; menu.
</p>
<p>You can run command-line R and <code>Rscript</code> from a
-Terminal<a name="DOCF17" href="#FOOT17"><sup>17</sup></a> so these can be
+Terminal<a name="DOCF18" href="#FOOT18"><sup>18</sup></a> so these can be
typed as commands like any other Unix-alike: see the next chapter of
this manual. There are some small differences which may surprise users
of R on other platforms, notably the default location of the personal
@@ -2063,11 +2067,11 @@ also be removed.
run:
</p>
<div class="example">
-<pre class="example">sudo rm -rf /Library/Frameworks/R.framework /Applications/R.app \
+<pre class="example">sudo rm -Rf /Library/Frameworks/R.framework /Applications/R.app \
/usr/local/bin/R /usr/local/bin/Rscript
</pre></div>
-<p>The installation consists of up to four Apple packages:<a name="DOCF18" href="#FOOT18"><sup>18</sup></a>
+<p>The installation consists of up to four Apple packages:<a name="DOCF19" href="#FOOT19"><sup>19</sup></a>
<code>org.r-project.R.el-capitan.fw.pkg</code>,
<code>org.r-project.R.el-capitan.GUI.pkg</code>,
<code>org.r-project.x86_64.tcltk.x11</code> and
@@ -2095,7 +2099,7 @@ pkgutil --files org.r-project.x86_64.texinfo
<a name="Multiple-versions-1"></a>
<h3 class="section">4.3 Multiple versions</h3>
-<p>The installer will remove any previous version<a name="DOCF19" href="#FOOT19"><sup>19</sup></a> of
+<p>The installer will remove any previous version<a name="DOCF20" href="#FOOT20"><sup>20</sup></a> of
the R framework which it finds installed. This can be avoided by
using <code>pkgutil --forget</code> (see the previous section). However,
note that different versions are installed under
@@ -2223,7 +2227,7 @@ package installed there.
</p>
<p>R comes with a single library, <samp><var>R_HOME</var>/library</samp> which is
the value of the R object &lsquo;<samp>.Library</samp>&rsquo; containing the standard and
-recommended<a name="DOCF20" href="#FOOT20"><sup>20</sup></a> packages.
+recommended<a name="DOCF21" href="#FOOT21"><sup>21</sup></a> packages.
Both sites and users can create others and make use of them (or not) in
an R session. At the lowest level &lsquo;<samp>.libPaths()</samp>&rsquo; can be used to
add paths to the collection of libraries or to report the current
@@ -2234,7 +2238,7 @@ collection.
<p>R will automatically make use of a site-specific library
<samp><var>R_HOME</var>/site-library</samp> if this exists (it does not in a
vanilla R installation). This location can be overridden by
-setting<a name="DOCF21" href="#FOOT21"><sup>21</sup></a> &lsquo;<samp>.Library.site</samp>&rsquo; in
+setting<a name="DOCF22" href="#FOOT22"><sup>22</sup></a> &lsquo;<samp>.Library.site</samp>&rsquo; in
<samp><var>R_HOME</var>/etc/Rprofile.site</samp>, or (not recommended) by setting
the
<a name="index-R_005fLIBS_005fSITE"></a>
@@ -2281,7 +2285,7 @@ absolute path to a valid temporary directory, not containing spaces.
<p>For most users it suffices to call
&lsquo;<samp>install.packages(<var>pkgname</var>)</samp>&rsquo; or its GUI equivalent if the
intention is to install a <acronym>CRAN</acronym> package and internet access is
-available.<a name="DOCF22" href="#FOOT22"><sup>22</sup></a> On most systems &lsquo;<samp>install.packages()</samp>&rsquo;
+available.<a name="DOCF23" href="#FOOT23"><sup>23</sup></a> On most systems &lsquo;<samp>install.packages()</samp>&rsquo;
will allow packages to be selected from a list box (typically with
several thousand items).
</p>
@@ -2399,7 +2403,7 @@ of the running <code>R</code> succeeded, whether or not the other
architecture was successfully installed. The exceptions are packages
with a non-empty <samp>configure.win</samp> script or which make use of
<samp>src/Makefile.win</samp>. If <samp>configure.win</samp> does something
-appropriate to both architectures use<a name="DOCF23" href="#FOOT23"><sup>23</sup></a> option
+appropriate to both architectures use<a name="DOCF24" href="#FOOT24"><sup>24</sup></a> option
<samp>--force-biarch</samp>: otherwise <code>R CMD INSTALL
--merge-multiarch</code> can be applied to a source tarball to merge separate
32- and 64-bit installs. (This can only be applied to a tarball, and
@@ -2423,7 +2427,7 @@ variable <code>LOCAL_SOFT</code>, to give an equivalent of <samp>/usr/local</sam
on a Unix-alike. All of these can be set in
<samp>src/gnuwin32/MkRules.local</samp> when R is built from sources (see
the comments in <samp>src/gnuwin32/MkRules.dist</samp>), or in
-file<a name="DOCF24" href="#FOOT24"><sup>24</sup></a>
+file<a name="DOCF25" href="#FOOT25"><sup>25</sup></a>
<samp>etc/i386/Makeconf</samp> or <samp>etc/x64/Makeconf</samp> for an installed
version of R. In the latter case only <code>BINPREF</code> is used, with
the 64 bit path used in <samp>etc/x64/Makeconf</samp>. The version used by
@@ -2525,7 +2529,7 @@ statically-linked up-to-date copy of the Open Source package from its
sources or from <a href="https://r.research.att.com/libs">https://r.research.att.com/libs</a>. But sometimes
it is desirable/necessary to use Apple&rsquo;s dynamically linked library, in
which case appropriate headers could be extracted from the
-sources<a name="DOCF25" href="#FOOT25"><sup>25</sup></a> available <em>via</em>
+sources<a name="DOCF26" href="#FOOT26"><sup>26</sup></a> available <em>via</em>
<a href="https://opensource.apple.com">https://opensource.apple.com</a>.
</p>
<hr>
@@ -2541,7 +2545,7 @@ on Windows), or if that does not exist, <samp><var>HOME</var>/.R/Makevars</samp>
where &lsquo;<samp>R_PLATFORM</samp>&rsquo; is the platform for which R was built, as
available in the <code>platform</code> component of the R variable
<code>R.version</code>. The path to an alternative personal
-file<a name="DOCF26" href="#FOOT26"><sup>26</sup></a> can be specified <em>via</em> the environment variable
+file<a name="DOCF27" href="#FOOT27"><sup>27</sup></a> can be specified <em>via</em> the environment variable
<code>R_MAKEVARS_USER</code>.
</p>
<p>Package developers are encouraged to use this mechanism to enable a
@@ -2676,7 +2680,7 @@ choice for a user to set.
</p>
<p>On macOS the primary mechanism is to embed the absolute path to dependent
dynamic libraries into an object when it is compiled. Few R packages
-arrange to do so, but it can be edited<a name="DOCF27" href="#FOOT27"><sup>27</sup></a> <em>via</em> <code>install_name_tool</code> &mdash;
+arrange to do so, but it can be edited<a name="DOCF28" href="#FOOT28"><sup>28</sup></a> <em>via</em> <code>install_name_tool</code> &mdash;
that only deals with direct dependencies and those would also need to be
compiled to include the absolute paths of their dependencies. If the
choice of absolute path is to be deferred to load time, how they are
@@ -2956,7 +2960,7 @@ some OSes offer only one charset per language.
<a name="Locales-under-Unix_002dalikes-1"></a>
<h4 class="subsection">7.1.1 Locales under Unix-alikes</h4>
-<p>Modern Linux uses the XPG<a name="DOCF28" href="#FOOT28"><sup>28</sup></a> locale specifications which have the form
+<p>Modern Linux uses the XPG<a name="DOCF29" href="#FOOT29"><sup>29</sup></a> locale specifications which have the form
&lsquo;<samp>en_GB</samp>&rsquo;, &lsquo;<samp>en_GB.UTF-8</samp>&rsquo;, &lsquo;<samp>aa_ER.UTF-8@saaho</samp>&rsquo;,
&lsquo;<samp>de_AT.iso885915@euro</samp>&rsquo;, the components being in the order listed
above. (See <code>man locale</code> and <code>locale -a</code> for more
@@ -3017,7 +3021,7 @@ This can be overridden first by the setting of the environment variable
<a name="index-LC_005fALL"></a>
<a name="index-LC_005fMESSAGES"></a>
<a name="index-LANG"></a>
-<code>LANGUAGE</code> and then<a name="DOCF29" href="#FOOT29"><sup>29</sup></a>
+<code>LANGUAGE</code> and then<a name="DOCF30" href="#FOOT30"><sup>30</sup></a>
by the environment variables <code>LC_ALL</code>, <code>LC_MESSAGES</code> and
<code>LANG</code>. (The last three are normally used to set the locale and so
should not be needed, but the first is only used to select the language
@@ -3031,7 +3035,7 @@ language to Spanish.)
<p>It is usually possible to change the language once R is running
<em>via</em> (not Windows) <code>Sys.setlocale(&quot;LC_MESSAGES&quot;,
&quot;new_locale&quot;)</code>, or by setting an environment variable such as
-<code>LANGUAGE</code>, <em>provided</em><a name="DOCF30" href="#FOOT30"><sup>30</sup></a> the language you are changing to can be output in
+<code>LANGUAGE</code>, <em>provided</em><a name="DOCF31" href="#FOOT31"><sup>31</sup></a> the language you are changing to can be output in
the current character set. But this is OS-specific, and has been known
to stop working on an OS upgrade.
</p>
@@ -3070,7 +3074,7 @@ to a generic German one (&lsquo;<samp>de</samp>&rsquo;) for an Austrian user. H
specific translation catalogue exists but does not contain a
translation, the less specific catalogues are consulted. For example,
R has catalogues for &lsquo;<samp>en_GB</samp>&rsquo; that translate the Americanisms
-(e.g., &lsquo;<samp>gray</samp>&rsquo;) in the standard messages into English.<a name="DOCF31" href="#FOOT31"><sup>31</sup></a> Two other examples: there are catalogues
+(e.g., &lsquo;<samp>gray</samp>&rsquo;) in the standard messages into English.<a name="DOCF32" href="#FOOT32"><sup>32</sup></a> Two other examples: there are catalogues
for &lsquo;<samp>es</samp>&rsquo;, which is Spanish as written in Spain and these will by
default also be used in Spanish-speaking Latin American countries, and
also for &lsquo;<samp>pt_BR</samp>&rsquo;, which are used for Brazilian locales but not for
@@ -3086,7 +3090,7 @@ error messages with pairs of single quotes translated to Unicode directional
quotes.
</p>
<p>If no suitable translation catalogue is found or a particular message is
-not translated in any suitable catalogue, &lsquo;English&rsquo;<a name="DOCF32" href="#FOOT32"><sup>32</sup></a> is used.
+not translated in any suitable catalogue, &lsquo;English&rsquo;<a name="DOCF33" href="#FOOT33"><sup>33</sup></a> is used.
</p>
<p>See <a href="https://developer.r-project.org/Translations30.html">https://developer.r-project.org/Translations30.html</a> for how to
prepare and install translation catalogues.
@@ -3104,8 +3108,8 @@ but for some (e.g., &lsquo;<samp>x86_64</samp>&rsquo; Linux and macOS &ge; 10.6)
64-bit is.
</p>
<p>All current versions of R use 32-bit integers (this is enforced in
-the build) and <acronym>ISO</acronym>/<acronym>IEC</acronym>&nbsp;60559<a name="DOCF33" href="#FOOT33"><sup>33</sup></a> double-precision reals, and so compute
-to the same precision<a name="DOCF34" href="#FOOT34"><sup>34</sup></a> and with the same limits on the
+the build) and <acronym>ISO</acronym>/<acronym>IEC</acronym>&nbsp;60559<a name="DOCF34" href="#FOOT34"><sup>34</sup></a> double-precision reals, and so compute
+to the same precision<a name="DOCF35" href="#FOOT35"><sup>35</sup></a> and with the same limits on the
sizes of numerical quantities. The principal difference is in the size
of the pointers.
</p>
@@ -3168,7 +3172,7 @@ dimensions of an array are limited to <em>2^{31} - 1</em>.
<h2 class="chapter">9 The standalone Rmath library</h2>
<p>The routines supporting the distribution and
-special<a name="DOCF35" href="#FOOT35"><sup>35</sup></a> functions in R
+special<a name="DOCF36" href="#FOOT36"><sup>36</sup></a> functions in R
and a few others are declared in C header file <samp>Rmath.h</samp>. These
can be compiled into a standalone library for linking to other
applications. (Note that they are not a separate library when R is
@@ -3180,7 +3184,7 @@ is the current working directory (in the build directory tree on a
Unix-alike if that is separate from the sources).
</p>
<p><samp>Rmath.h</samp> contains &lsquo;<samp>R_VERSION_STRING</samp>&rsquo;, which is a character
-string containing the current R version, for example <code>&quot;3.4.0&quot;</code>.
+string containing the current R version, for example <code>&quot;3.4.4&quot;</code>.
</p>
<p>There is full access to R&rsquo;s handling of <code>NaN</code>, <code>Inf</code> and
<code>-Inf</code> via special versions of the macros and functions
@@ -3296,7 +3300,7 @@ library.
<a name="Windows-1"></a>
<h3 class="section">9.2 Windows</h3>
-<p>You need to set up<a name="DOCF36" href="#FOOT36"><sup>36</sup></a> almost all the
+<p>You need to set up<a name="DOCF37" href="#FOOT37"><sup>37</sup></a> almost all the
tools to make R and then run (in a Unix-like shell)
</p>
<div class="example">
@@ -3387,11 +3391,11 @@ versions installed.
<h3 class="section">A.1 Essential programs and libraries</h3>
<p>You need a means of compiling C and FORTRAN 90 (see <a href="#Using-FORTRAN">Using FORTRAN</a>). Your C compiler should be
-<acronym>ISO</acronym>/<acronym>IEC</acronym>&nbsp;60059<a name="DOCF37" href="#FOOT37"><sup>37</sup></a>, POSIX 1003.1 and C99-compliant.<a name="DOCF38" href="#FOOT38"><sup>38</sup></a> R tries to choose suitable
-flags<a name="DOCF39" href="#FOOT39"><sup>39</sup></a> for the C compilers it knows about, but you may have to
+<acronym>ISO</acronym>/<acronym>IEC</acronym>&nbsp;60059<a name="DOCF38" href="#FOOT38"><sup>38</sup></a>, POSIX 1003.1 and C99-compliant.<a name="DOCF39" href="#FOOT39"><sup>39</sup></a> R tries to choose suitable
+flags<a name="DOCF40" href="#FOOT40"><sup>40</sup></a> for the C compilers it knows about, but you may have to
set <code>CC</code> or <code>CFLAGS</code> suitably. For versions of <code>gcc</code>
prior to 5.1 with <code>glibc</code> this means including
-<samp>-std=gnu99</samp><a name="DOCF40" href="#FOOT40"><sup>40</sup></a>. (Note that options essential to run the compiler
+<samp>-std=gnu99</samp><a name="DOCF41" href="#FOOT41"><sup>41</sup></a>. (Note that options essential to run the compiler
even for linking, such as those to set the architecture, should be
specified as part of <code>CC</code> rather than in <code>CFLAGS</code>.)
</p>
@@ -3414,23 +3418,23 @@ usage requires <code>iconv</code> to be able to translate between
<code>&quot;latin1&quot;</code> and <code>&quot;UTF-8&quot;</code>, to recognize <code>&quot;&quot;</code> (as the
current encoding) and <code>&quot;ASCII&quot;</code>, and to translate to and from the
Unicode wide-character formats <code>&quot;UCS-[24][BL]E&quot;</code> &mdash; this is true
-by default for <code>glibc</code><a name="DOCF41" href="#FOOT41"><sup>41</sup></a> but not of most commercial Unixes. However, you
+by default for <code>glibc</code><a name="DOCF42" href="#FOOT42"><sup>42</sup></a> but not of most commercial Unixes. However, you
can make use of <acronym>GNU</acronym> <code>libiconv</code> (as used on macOS: see
<a href="https://www.gnu.org/software/libiconv/">https://www.gnu.org/software/libiconv/</a>).
</p>
-<p>The OS needs to have enough support<a name="DOCF42" href="#FOOT42"><sup>42</sup></a> for wide-character
+<p>The OS needs to have enough support<a name="DOCF43" href="#FOOT43"><sup>43</sup></a> for wide-character
types: this is checked at configuration. A small number of POSIX
-functions<a name="DOCF43" href="#FOOT43"><sup>43</sup></a> are essential,
-and others<a name="DOCF44" href="#FOOT44"><sup>44</sup></a> will be
+functions<a name="DOCF44" href="#FOOT44"><sup>44</sup></a> are essential,
+and others<a name="DOCF45" href="#FOOT45"><sup>45</sup></a> will be
used if available.
</p>
<p>Installations of <code>zlib</code> (version 1.2.5 or later), <code>libbz2</code>
(version 1.0.6 or later: called <strong>bzip2-libs</strong>/<strong>bzip2-devel</strong> or
<strong>libbz2-1.0</strong>/<strong>libbz2-dev</strong> by some Linux distributions),
-<code>liblzma</code><a name="DOCF45" href="#FOOT45"><sup>45</sup></a> version 5.0.3 or
+<code>liblzma</code><a name="DOCF46" href="#FOOT46"><sup>46</sup></a> version 5.0.3 or
later are required.
</p>
-<p>PCRE<a name="DOCF46" href="#FOOT46"><sup>46</sup></a> (version 8.32 or later, although versions 8.20&ndash;8.31 will
+<p>PCRE<a name="DOCF47" href="#FOOT47"><sup>47</sup></a> (version 8.32 or later, although versions 8.20&ndash;8.31 will
be accepted with a deprecation warning) is required (or just its library
and headers if packaged separately). Only the &lsquo;8-bit&rsquo; interface is used
(and only that is built by default when installing from sources). PCRE
@@ -3446,13 +3450,13 @@ for use with R a suitable <code>configure</code> command might be
<p>The <samp>--enable-jit</samp> flag is supported for most common CPUs. (See
also the comments for Solaris.)
</p>
-<p>Library <code>libcurl</code> (version 7.22.0 or later<a name="DOCF47" href="#FOOT47"><sup>47</sup></a>) is required, with at least 7.28.0 being desirable.
+<p>Library <code>libcurl</code> (version 7.22.0 or later<a name="DOCF48" href="#FOOT48"><sup>48</sup></a>) is required, with at least 7.28.0 being desirable.
Information on <code>libcurl</code> is found from the <code>curl-config</code>
-script: if that is missing or needs to be overridden<a name="DOCF48" href="#FOOT48"><sup>48</sup></a> there are macros to do so described in file
+script: if that is missing or needs to be overridden<a name="DOCF49" href="#FOOT49"><sup>49</sup></a> there are macros to do so described in file
<samp>config.site</samp>.
</p>
<p>A <code>tar</code> program is needed to unpack the sources and packages
-(including the recommended packages). A version<a name="DOCF49" href="#FOOT49"><sup>49</sup></a> that can
+(including the recommended packages). A version<a name="DOCF50" href="#FOOT50"><sup>50</sup></a> that can
automagically detect compressed archives is preferred for use with
<code>untar()</code>: the configure script looks for <code>gtar</code> and
<code>gnutar</code> before
@@ -3472,7 +3476,7 @@ make PDF versions of the manuals you will also need file
<samp>texinfo.tex</samp> installed (which is part of the <acronym>GNU</acronym>
<strong>texinfo</strong> distribution but is often made part of the TeX package
in re-distributions) as well as
-<code>texi2dvi</code>.<a name="DOCF50" href="#FOOT50"><sup>50</sup></a>
+<code>texi2dvi</code>.<a name="DOCF51" href="#FOOT51"><sup>51</sup></a>
Further, the versions of <code>texi2dvi</code> and <samp>texinfo.tex</samp> need
to be compatible: we have seen problems with older TeX distributions.
</p>
@@ -3535,18 +3539,18 @@ earliest version we have tested. (For Fedora users we believe the
&lsquo;<samp>pangocairo</samp>&rsquo; package is installed (and if not, &lsquo;<samp>cairo</samp>&rsquo;) and if
additional flags are needed for the &lsquo;<samp>cairo-xlib</samp>&rsquo; package, then if
suitable code can be compiled. These tests will fail if
-<code>pkg-config</code> is not installed<a name="DOCF51" href="#FOOT51"><sup>51</sup></a>, and are likely to fail if <code>cairo</code> was built
+<code>pkg-config</code> is not installed<a name="DOCF52" href="#FOOT52"><sup>52</sup></a>, and are likely to fail if <code>cairo</code> was built
statically (unusual). Most systems with <code>Gtk+</code> 2.8 or later
installed will have suitable libraries
</p>
<p>For the best font experience with these devices you need suitable fonts
installed: Linux users will want the <code>urw-fonts</code> package. On
platforms which have it available, the <code>msttcorefonts</code>
-package<a name="DOCF52" href="#FOOT52"><sup>52</sup></a> provides
+package<a name="DOCF53" href="#FOOT53"><sup>53</sup></a> provides
TrueType versions of Monotype fonts such as Arial and Times New Roman.
Another useful set of fonts is the &lsquo;liberation&rsquo; TrueType fonts available
at
-<a href="https://fedorahosted.org/liberation-fonts/">https://fedorahosted.org/liberation-fonts/</a>,<a name="DOCF53" href="#FOOT53"><sup>53</sup></a> which cover the Latin, Greek and Cyrillic alphabets
+<a href="https://fedorahosted.org/liberation-fonts/">https://fedorahosted.org/liberation-fonts/</a>,<a name="DOCF54" href="#FOOT54"><sup>54</sup></a> which cover the Latin, Greek and Cyrillic alphabets
plus a fair range of signs. These share metrics with Arial, Times New
Roman and Courier New, and contain fonts rather similar to the first two
(<a href="https://en.wikipedia.org/wiki/Liberation_fonts">https://en.wikipedia.org/wiki/Liberation_fonts</a>). Then there
@@ -3581,11 +3585,14 @@ the resulting build will not pass its checks.).
<p>An implementation of <acronym>XDR</acronym> is required, and the R sources
contain one which is likely to suffice (although a system version may
have higher performance). <acronym>XDR</acronym> is part of <acronym>RPC</acronym> and
-historically has been part of <samp>libc</samp> on a Unix-alike. However some
-builds of <code>glibc</code> hide it with the intention that the
-<acronym>TI-RPC</acronym> library be used instead, in which case <code>libtirpc</code>
-(and its development version) needs to be installed, and its headers
-need to be on the C include path or in <samp>/usr/include/tirpc</samp>.
+historically has been part of <samp>libc</samp> on a Unix-alike. (In
+principle <code>man xdr_string</code> should tell you which library is
+needed, but it often does not: on Solaris and others it is provided by
+<code>libnsl</code>.) However some builds<a name="DOCF55" href="#FOOT55"><sup>55</sup></a> of
+<code>glibc</code> omit or hide it with the intention that the
+<acronym>TI-RPC</acronym> library be used, in which case <code>libtirpc</code> (and its
+development version) needs to be installed, and its headers need to be
+on the C include path or in <samp>/usr/include/tirpc</samp>.
</p>
<p>Use of the X11 clipboard selection requires the <code>Xmu</code> headers and
libraries. These are normally part of an X11 installation (e.g. the
@@ -3644,7 +3651,7 @@ files may be necessary to avoid confusion between them.
<p>Versions of Tcl/Tk up to 8.5.19 and 8.6.4 have been tested (including
most versions of 8.4.x, but not recently).
</p>
-<p>Note that the <samp>tk.h</samp> header includes<a name="DOCF54" href="#FOOT54"><sup>54</sup></a> X11 headers, so you will need X11 and its
+<p>Note that the <samp>tk.h</samp> header includes<a name="DOCF56" href="#FOOT56"><sup>56</sup></a> X11 headers, so you will need X11 and its
development files installed.
</p>
<hr>
@@ -3775,7 +3782,7 @@ well as <code>LSAME</code>), and appears to be usable. However, an external
position-independent code), and that is not checked.
</p>
<p>Some enhanced <acronym>BLAS</acronym>es are compiler-system-specific
-(<code>sunperf</code> on Solaris<a name="DOCF55" href="#FOOT55"><sup>55</sup></a>, <code>libessl</code> on IBM,
+(<code>sunperf</code> on Solaris<a name="DOCF57" href="#FOOT57"><sup>57</sup></a>, <code>libessl</code> on IBM,
<code>Accelerate</code> on macOS). The correct incantation for these is often
found <em>via</em> <samp>--with-blas</samp> with no value on the appropriate
platforms.
@@ -3788,13 +3795,16 @@ multi-threaded <acronym>BLAS</acronym>. Note that using a multi-threaded
more elapsed time (occasionally dramatically so) than using a similar
single-threaded <acronym>BLAS</acronym>. On a machine running other tasks, there
can be contention for CPU caches that reduces the effectiveness of the
-optimization of cache use by a <acronym>BLAS</acronym> implementation.
+optimization of cache use by a <acronym>BLAS</acronym> implementation: some
+people warn that this is especially problematic for hyperthreaded CPUs
</p>
<p>Note that under Unix (but not under Windows) if R is compiled against
a non-default <acronym>BLAS</acronym> and <samp>--enable-BLAS-shlib</samp> is
-<strong>not</strong> used, then all <acronym>BLAS</acronym>-using packages must also be.
-So if R is re-built to use an enhanced <acronym>BLAS</acronym> then packages
-such as <a href="https://CRAN.R-project.org/package=quantreg"><strong>quantreg</strong></a> will need to be re-installed.
+<strong>not</strong> used (it is the default on all platforms except AIX), then
+all <acronym>BLAS</acronym>-using packages must also be. So if R is re-built
+to use an enhanced <acronym>BLAS</acronym> then packages such as
+<a href="https://CRAN.R-project.org/package=quantreg"><strong>quantreg</strong></a> will need to be re-installed; they may be under other
+circumstances.
</p>
<p>R relies on <acronym>ISO</acronym>/<acronym>IEC</acronym>&nbsp;60559 compliance of an
external <acronym>BLAS</acronym>. This can be broken if for example the code
@@ -3803,13 +3813,21 @@ be computed&mdash;whereas <code>x*0</code> can be <code>NaN</code>. This is che
the test suite.
</p>
<p>External <acronym>BLAS</acronym> implementations often make less use of
-extended-precision floating-point registers and will almost certainly
-re-order computations. This can result in less accuracy than using the
-internal <acronym>BLAS</acronym>, and may result in different solutions, e.g.
-different signs in SVD and eigendecompositions.
+extended-precision floating-point registers (where available) and will
+almost certainly re-order computations. This can result in less
+accuracy than using a reference <acronym>BLAS</acronym>, and may result in
+different solutions, e.g. different signs in SVD and
+eigendecompositions.
</p>
-<p>The URIs for several of these BLAS are subject to frequent gratuitous
-changes, so you will need to search for their current locations.
+<p>Debian/Ubuntu systems provide a system-specific way to switch the BLAS
+in use. Build R with <samp>-with-blas</samp> to select the OS version
+of the reference BLAS, and then use <code>update-alternatives</code> to
+switch between the available BLAS libraries. See
+<a href="https://wiki.debian.org/DebianScience/LinearAlgebraLibraries">https://wiki.debian.org/DebianScience/LinearAlgebraLibraries</a>.
+</p>
+<p>The URIs for several of these BLAS have been subject to frequent
+gratuitous changes, so you will need to search for their current
+locations.
</p>
<hr>
@@ -3820,101 +3838,109 @@ changes, so you will need to search for their current locations.
<p>ATLAS (<a href="http://math-atlas.sourceforge.net/">http://math-atlas.sourceforge.net/</a>) is a &ldquo;tuned&rdquo;
<acronym>BLAS</acronym> that runs on a wide range of Unix-alike platforms.
Unfortunately it is built by default as a static library that on some
-platforms cannot be used with shared objects such as are used in R
-packages. Be careful when using pre-built versions of ATLAS (they seem
-to work on &lsquo;<samp>ix86</samp>&rsquo; platforms, but not always on &lsquo;<samp>x86_64</samp>&rsquo;
-ones).
-</p>
-<p>The usual way to specify ATLAS will be via
+platforms may not be able to be used with shared objects such as are
+used in R packages. Be careful when using pre-built versions of
+ATLAS static libraries (they seem to work on &lsquo;<samp>ix86</samp>&rsquo; platforms,
+but not always on &lsquo;<samp>x86_64</samp>&rsquo; ones).
</p>
-<div class="example">
-<pre class="example">--with-blas=&quot;-lf77blas -latlas&quot;
-</pre></div>
-
-<p>if the libraries are in the library path, otherwise by
+<p>ATLAS contains replacements for a small number of LAPACK routines, but
+can be built to merge these with LAPACK sources to include a full LAPACK
+library.
</p>
-<div class="example">
-<pre class="example">--with-blas=&quot;-L/path/to/ATLAS/libs -lf77blas -latlas&quot;
+<p>Recent versions of ATLAS can be built as a single shared library, either
+<code>libsatlas</code> or <code>libtatlas</code> (serial or threaded respectively):
+these may even contain a full LAPACK. Such builds can be used by one of
+</p><div class="example">
+<pre class="example">--with-blas=satlas
+--with-blas=tatlas
</pre></div>
-
-<p>For example, &lsquo;<samp>x86_64</samp>&rsquo; Fedora needs
+<p>or, as on &lsquo;<samp>x86_64</samp>&rsquo; Fedora where a path needs to be specified,
</p><div class="example">
-<pre class="example">--with-blas=&quot;-L/usr/lib64/atlas -lf77blas -latlas&quot;
+<pre class="example">--with-blas=&quot;-L/usr/lib64/atlas -lsatlas&quot;
+--with-blas=&quot;-L/usr/lib64/atlas -ltatlas&quot;
</pre></div>
-
-<p>For systems with multiple CPU cores it is possible to use a
-multi-threaded version of ATLAS, by specifying
+<p>Distributed ATLAS libraries cannot be tuned to your machine and so are a
+compromise: for example Fedora tunes &lsquo;<samp>x86_64</samp>&rsquo; for CPUs with SSE3
+extensions, and separate &lsquo;<samp>atlas-sse2</samp>&rsquo; and &lsquo;<samp>atlas-sse3</samp>&rsquo;
+&lsquo;<samp>i686</samp>&rsquo; RPMs are available.<a name="DOCF58" href="#FOOT58"><sup>58</sup></a>
</p>
-<div class="example">
-<pre class="example">--with-blas=&quot;-lptf77blas -lpthread -latlas&quot;
-</pre></div>
-
-<p>Consult its installation guide for how to build ATLAS with
-position-independent code, and as a shared library.
+<p>Note that building R on Linux against distributed shared libraries
+may need &lsquo;<samp>-devel</samp>&rsquo; or &lsquo;<samp>-dev</samp>&rsquo; packages installed.
</p>
-<hr>
-<a name="ACML"></a>
-<a name="ACML-1"></a>
-<h4 class="subsubsection">A.3.1.2 ACML</h4>
-
-<p>For &lsquo;<samp>x86_64</samp>&rsquo; processors<a name="DOCF56" href="#FOOT56"><sup>56</sup></a> under Linux there is the AMD Core Math Library (ACML).
-For the <code>gcc</code> version we could use
-</p>
-<div class="example">
-<pre class="example">--with-blas=&quot;-lacml&quot;
-</pre></div>
-
-<p>if the appropriate library directory (such as
-<a name="index-LD_005fLIBRARY_005fPATH-1"></a>
-<samp>/opt/acml5.1.0/gfortran64/lib</samp>) is in the <code>LD_LIBRARY_PATH</code>.
-For other compilers, see the ACML documentation. There is a
-multithreaded Linux version of ACML available for recent versions of
-<code>gfortran</code>. To make use of this you will need something like
-</p>
-<div class="example">
-<pre class="example">--with-blas=&quot;-L/opt/acml5.1.0/gfortran64_mp/lib -lacml_mp&quot;
+<p>Linking against multiple static libraries requires one of
+</p><div class="example">
+<pre class="example">--with-blas=&quot;-lf77blas -latlas&quot;
+--with-blas=&quot;-lptf77blas -lpthread -latlas&quot;
+--with-blas=&quot;-L/path/to/ATLAS/libs -lf77blas -latlas&quot;
+--with-blas=&quot;-L/path/to/ATLAS/libs -lptf77blas -lpthread -latlas&quot;
</pre></div>
-<p>(and you may need to arrange for the directory to be in <code>ld.so</code>
-cache).
+<p>Consult its installation
+guide<a name="DOCF59" href="#FOOT59"><sup>59</sup></a>
+for how to build ATLAS as a shared library or as a static library with
+position-independent code (on platforms where that matters).
</p>
-<p>See see <a href="#Shared-BLAS">Shared BLAS</a> for an alternative (and in many ways preferable)
-way to use ACML.
-</p>
-<p>The version last tested (5.1.0) failed the <samp>reg-BLAS.R</samp> test in its
-handling of <code>NA</code>s.
+<p>According to the ATLAS
+FAQ<a name="DOCF60" href="#FOOT60"><sup>60</sup></a> the
+maximum number of threads used by multi-threaded ATLAS is set at compile
+time. Also, the author advises against using multi-threaded ATLAS on
+hyperthreaded CPUs without restricting affinities at compile-time to one
+virtual core per physical CPU. (For the Fedora libraries the
+compile-time flag specifies 4 threads.)
</p>
+
<hr>
<a name="Goto-and-OpenBLAS"></a>
<a name="Goto-and-OpenBLAS-1"></a>
-<h4 class="subsubsection">A.3.1.3 Goto and OpenBLAS</h4>
+<h4 class="subsubsection">A.3.1.2 Goto and OpenBLAS</h4>
-<p>Dr Kazushige Goto wrote a tuned <acronym>BLAS</acronym> for several processors and
-OSes, which was frozen in mid-2010. The final version is known as
+<p>Dr Kazushige Goto wrote a tuned <acronym>BLAS</acronym> for several processors
+and OSes, which was frozen in mid-2010. The final version is known as
GotoBLAS2, and was re-released under a much less restrictive licence.
-Once it is built and installed, it can be used by configuring R with
+OpenBLAS (<a href="http://www.openblas.net/">http://www.openblas.net/</a>) is a descendant project with
+support for some later CPUs (e.g. Intel Sandy Bridge and Haswell).
+</p>
+<p>These can be used by configuring R with something like
</p>
<div class="example">
<pre class="example">--with-blas=&quot;-lgoto2&quot;
+--with-blas=&quot;-lopenblas&quot;
</pre></div>
<p>See see <a href="#Shared-BLAS">Shared BLAS</a> for an alternative (and in many ways preferable)
-way to use it.
+way to use them.
</p>
-<p>OpenBLAS (<a href="http://www.openblas.net/">http://www.openblas.net/</a>) is a descendant
-project with support for some later CPUs (e.g. Intel Sandy Bridge).
-Once installed it can be used by something like
-</p>
-<div class="example">
-<pre class="example">--with-blas=&quot;-lopenblas&quot;
+<p>Some platforms provide multiple builds of OpenBLAS: for example Fedora 26
+has RPMs<a name="DOCF61" href="#FOOT61"><sup>61</sup></a>
+</p><div class="example">
+<pre class="example">openblas
+openblas-threads
+openblas-openmp
</pre></div>
-
-<p>or as a shared BLAS.
+<p>providing shared
+libraries
+</p><div class="example">
+<pre class="example">libopenblas.so
+libopenblasp.so
+libopenblaso.so
+</pre></div>
+<p>respectively, each of which can be used as a shared BLAS. For the
+second and third the number of threads is controlled by
+<code>OPENBLAS_NUM_THREADS</code> and <code>OMP_NUM_THREADS</code> (as usual for
+OpenMP) respectively. There is also a Fedora RPM &lsquo;<samp>openblas-Rblas</samp>&rsquo;
+to replace <samp>libRblas.so</samp> in their distribution of R.
+</p>
+<p>Note that building R on Linux against distributed libraries may need
+&lsquo;<samp>-devel</samp>&rsquo; or &lsquo;<samp>-dev</samp>&rsquo; packages installed.
+</p>
+<p>For &lsquo;<samp>ix86</samp>&rsquo; and &lsquo;<samp>x86_64</samp>&rsquo; most distributed libraries
+contain several alternatives for different CPU microarchitectures with
+the choice being made at run time.
</p>
<hr>
<a name="MKL"></a>
<a name="Intel-MKL"></a>
-<h4 class="subsubsection">A.3.1.4 Intel MKL</h4>
+<h4 class="subsubsection">A.3.1.3 Intel MKL</h4>
<p>For Intel processors (and perhaps others) and some distributions of
Linux, there is Intel&rsquo;s Math Kernel Library. You are strongly
encouraged to read the MKL User&rsquo;s Guide, which is installed with the
@@ -3924,17 +3950,17 @@ recommended. Or see
<a href="https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor">https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor</a>.
</p>
<p>There are also versions of MKL for macOS and Windows, but at the time
-these were tried they did not work with the standard compilers used for
+these were tried they did not work with the default compilers used for
R on those platforms.
</p>
<p>The MKL interface has changed several times and may change again: the
-following examples have been used with versions 10.3 to 11.3, for GCC
+following examples have been used with versions 10.3 to 2018.1, for GCC
compilers on &lsquo;<samp>x86_64</samp>&rsquo;.
</p>
-<p>To a sequential version of MKL we used
+<p>To use a sequential version of MKL we used
</p>
<div class="example">
-<pre class="example">MKL_LIB_PATH=/path/to/intel_mkl/lib/intel64
+<pre class="example">MKL_LIB_PATH=/path/to/intel_mkl/mkl/lib/intel64
export LD_LIBRARY_PATH=$MKL_LIB_PATH
MKL=&quot;-L${MKL_LIB_PATH} -lmkl_gf_lp64 -lmkl_core -lmkl_sequential&quot;
./configure --with-blas=&quot;$MKL&quot; --with-lapack
@@ -3955,8 +3981,10 @@ can be omitted.
<p>The default number of threads will be chosen by the OpenMP software, but
can be controlled by setting <code>OMP_NUM_THREADS</code> or
<code>MKL_NUM_THREADS</code>, and in recent versions seems to default to a
-sensible value for sole use of the machine.
+sensible value for sole use of the machine. (Parallel MKL has not
+always passed <code>make check-all</code>, but did with MKL 2018.1.)
</p>
+
<p>It has been reported that
</p>
<div class="example">
@@ -3966,6 +3994,14 @@ sensible value for sole use of the machine.
<p>worked with the Intel 2015.3 compilers on Centos 6.
</p>
<hr>
+<a name="ACML"></a>
+<a name="ACML-1"></a>
+<h4 class="subsubsection">A.3.1.4 ACML</h4>
+
+<p>The AMD Core Math Library (ACML) is now end-of-life, although downloads
+remained available when checked in January 2018.
+</p>
+<hr>
<a name="Shared-BLAS"></a>
<a name="Shared-BLAS-1"></a>
<h4 class="subsubsection">A.3.1.5 Shared BLAS</h4>
@@ -3990,7 +4026,7 @@ disabled via <samp>--disable-BLAS-shlib</samp>.
<ul>
<li> It saves space by having only a single copy of the <acronym>BLAS</acronym>
routines, which is helpful if there is an external static <acronym>BLAS</acronym>
-such as used to be standard for ATLAS.
+(as used to be standard for ATLAS).
</li><li> There may be performance disadvantages in using a shared <acronym>BLAS</acronym>.
Probably the most likely is when R&rsquo;s internal <acronym>BLAS</acronym> is used
@@ -4009,17 +4045,32 @@ changed in <samp><var>R_HOME</var>/etc/ldpaths</samp>.
</li></ul>
<p>Another option to change the <acronym>BLAS</acronym> in use is to symlink a
-dynamic <acronym>BLAS</acronym> library (such as ACML or Goto&rsquo;s) to
+single dynamic <acronym>BLAS</acronym> library to
<samp><var>R_HOME</var>/lib/libRblas.so</samp>. For example, just
</p>
<div class="example">
<pre class="example">mv <var>R_HOME</var>/lib/libRblas.so <var>R_HOME</var>/lib/libRblas.so.keep
-ln -s /opt/acml5.1.0/gfortran64_mp/lib/libacml_mp.so <var>R_HOME</var>/lib/libRblas.so
+ln -s /usr/lib64/libopenblasp.so.0 <var>R_HOME</var>/lib/libRblas.so
</pre></div>
-<p>will change the <acronym>BLAS</acronym> in use to multithreaded ACML. A similar
-link works for some versions of Goto <acronym>BLAS</acronym>, OpenBLAS and MKL
-(provided the appropriate <samp>lib</samp> directory is in the run-time
-library path or <code>ld.so</code> cache).
+
+<p>on &lsquo;<samp>x86_64</samp>&rsquo; Fedora will change the <acronym>BLAS</acronym> used to
+multithreaded OpenBLAS. A similar link works for most versions of the
+Goto <acronym>BLAS</acronym>, OpenBLAS and ACML (provided the appropriate
+<samp>lib</samp> directory is in the run-time library path or <code>ld.so</code>
+cache). It can also be used for a single-library ATLAS, so on
+&lsquo;<samp>x86_64</samp>&rsquo; Fedora
+</p>
+<div class="example">
+<pre class="example">ln -s /usr/lib64/atlas/libsatlas.so.3 <var>R_HOME</var>/lib/libRblas.so
+ln -s /usr/lib64/atlas/libtatlas.so.3 <var>R_HOME</var>/lib/libRblas.so
+</pre></div>
+
+<p>can be used with its distributed ATLAS libraries. (If you have the
+&lsquo;<samp>-devel</samp>&rsquo; RPMS installed you can omit the <code>.0</code>/<code>.3</code>.)
+</p>
+<p>Note that rebuilding or symlinking <samp>libRblas.so</samp> will not suffice
+if the intention is to use a modified LAPACK contained in an external
+BLAS: the latter could even cause conflicts.
</p>
<hr>
@@ -4030,7 +4081,7 @@ library path or <code>ld.so</code> cache).
<a name="index-LAPACK-library"></a>
<p>Provision is made for using an external LAPACK library, principally to
cope with <acronym>BLAS</acronym> libraries which contain a copy of LAPACK (such
-as <code>sunperf</code> on Solaris, <code>Accelerate</code> on macOS and ACML and MKL
+as <code>sunperf</code> on Solaris, <code>Accelerate</code> on macOS and ATLAS and MKL
on &lsquo;<samp>ix86</samp>&rsquo;/&lsquo;<samp>x86_64</samp>&rsquo; Linux). At least LAPACK version 3.2
is required. This can only be done if <samp>--with-blas</samp> has been used.
</p>
@@ -4042,14 +4093,11 @@ the configuration option <samp>--with-lapack</samp>. The default for
<samp>--with-lapack</samp> is to check the <acronym>BLAS</acronym> library and then
look for an external library &lsquo;<samp>-llapack</samp>&rsquo;. Sites searching for the
fastest possible linear algebra may want to build a LAPACK library using
-the ATLAS-optimized subset of LAPACK. To do so specify something like
+the ATLAS-optimized subset of LAPACK: this is simplest with a dynamic
+ATLAS library which contains a full LAPACK, when <samp>--with-lapack</samp>
+suffices.
</p>
-<div class="example">
-<pre class="example">--with-lapack=&quot;-L/path/to/ATLAS/libs -llapack -lcblas&quot;
-</pre></div>
-
-<p>since the ATLAS subset of LAPACK depends on <code>libcblas</code>. A value
-for <samp>--with-lapack</samp> can be set <em>via</em> the environment
+<p>A value for <samp>--with-lapack</samp> can be set <em>via</em> the environment
variable
<a name="index-LAPACK_005fLIBS"></a>
<code>LAPACK_LIBS</code>, but this will only be used if <samp>--with-lapack</samp>
@@ -4080,7 +4128,7 @@ where it is used unnecessarily will simply irritate the R helpers.
<p>Note too the comments about <acronym>ISO</acronym>/<acronym>IEC</acronym>&nbsp;60559
compliance in the section of external <acronym>BLAS</acronym>: these apply
equally to an external LAPACK, and for example the Intel MKL
-documentation says
+documentation has said
</p><blockquote>
<p>LAPACK routines assume that input matrices do not contain IEEE 754
special values such as INF or NaN values. Using these special values may
@@ -4088,8 +4136,8 @@ cause LAPACK to return unexpected results or become unstable.
</p></blockquote>
<p>We rely on limited support in LAPACK for matrices with <em>2^{31}</em> or
-more elements: it is quite possible that an external LAPACK will not
-have that support.
+more elements: it is possible that an external LAPACK will not have that
+support.
</p>
<p>If you have a pure FORTRAN 77 compiler which cannot compile LAPACK it
may be possible to use CLAPACK from
@@ -4180,7 +4228,7 @@ a dynamic (shared) library, typically called <samp>libR.so</samp>, and link
the main R executable <samp>R.bin</samp> against that library. This can
only be done if all the code (including system libraries) can be
compiled into a dynamic library, and there may be a
-performance<a name="DOCF57" href="#FOOT57"><sup>57</sup></a> penalty. So you probably
+performance<a name="DOCF62" href="#FOOT62"><sup>62</sup></a> penalty. So you probably
only want this if you will be using an application which embeds R.
Note that C code in packages installed on an R system linked with
<samp>--enable-R-shlib</samp> is linked against the dynamic library and so
@@ -4197,7 +4245,7 @@ anything.) The system headers for <code>valgrind</code> can be requested
by option <samp>--with-system-valgrind-headers</samp>: they will be used if
present (on Linux they may be in a separate package such as
<strong>valgrind-devel</strong>). Note though that there is no guarantee that the
-code in R will be compatible with very old<a name="DOCF58" href="#FOOT58"><sup>58</sup></a> or future <code>valgrind</code>
+code in R will be compatible with very old<a name="DOCF63" href="#FOOT63"><sup>63</sup></a> or future <code>valgrind</code>
headers.
</p>
<p>If you need to re-configure R with different options you may need to run
@@ -4403,7 +4451,7 @@ is to search for
<code>epcf90</code>,
<code>g77</code>, <code>f77</code>, <code>xlf</code>, <code>frt</code>,
<code>pgf77</code>, <code>cf77</code>, <code>fort77</code>, <code>fl32</code>,
-<code>af77</code> (in that order)<a name="DOCF59" href="#FOOT59"><sup>59</sup></a>, and use whichever is found first; if none is found,
+<code>af77</code> (in that order)<a name="DOCF64" href="#FOOT64"><sup>64</sup></a>, and use whichever is found first; if none is found,
R cannot be compiled.
However, if <code>CC</code> is <code>gcc</code>, the matching FORTRAN compiler
(<code>g77</code> for <code>gcc</code>&nbsp;3 and <code>gfortran</code> for
@@ -4418,7 +4466,7 @@ running <code>configure</code>, or use the configure variable <code>F77</code> t
specify its full path.
</p>
<p>If your FORTRAN libraries are in slightly peculiar places, you should
-<a name="index-LD_005fLIBRARY_005fPATH-2"></a>
+<a name="index-LD_005fLIBRARY_005fPATH-1"></a>
also look at <code>LD_LIBRARY_PATH</code> or your system&rsquo;s equivalent to make
sure that all libraries are on this path.
</p>
@@ -4432,7 +4480,7 @@ pointer. This is checked during the configuration process.
</p>
<p>Some of the FORTRAN code makes use of <code>COMPLEX*16</code> variables, which
is a Fortran 90 extension. This is checked for at configure
-time<a name="DOCF60" href="#FOOT60"><sup>60</sup></a>, but you may need to avoid
+time<a name="DOCF65" href="#FOOT65"><sup>65</sup></a>, but you may need to avoid
compiler flags asserting FORTRAN 77 compliance.
</p>
<p>Compiling the version of LAPACK in the R sources also requires some
@@ -4529,7 +4577,7 @@ options for the linker
</dl>
<p>Library paths specified as <samp>-L/lib/path</samp> in <code>LDFLAGS</code> are
-<a name="index-LD_005fLIBRARY_005fPATH-3"></a>
+<a name="index-LD_005fLIBRARY_005fPATH-2"></a>
collected together and prepended to <code>LD_LIBRARY_PATH</code> (or your
system&rsquo;s equivalent), so there should be no need for <samp>-R</samp> or
<samp>-rpath</samp> flags.
@@ -4572,7 +4620,7 @@ in the rest of this section.
under <samp>m4</samp> by <code>autoconf</code> and <code>aclocal</code> (part of the
<strong>automake</strong> package). There is a formal version requirement on
<code>autoconf</code> of 2.62 or later, but it is unlikely that anything
-other than the most recent versions<a name="DOCF61" href="#FOOT61"><sup>61</sup></a> have been thoroughly tested.
+other than the most recent versions<a name="DOCF66" href="#FOOT66"><sup>66</sup></a> have been thoroughly tested.
</p>
<p>File <samp>src/include/config.h</samp> is created by <code>autoheader</code>
(part of <strong>autoconf</strong>).
@@ -4589,7 +4637,7 @@ directory. To re-create the sources from
<samp>src/library/compiler/noweb/compiler.nw</samp>, the command
<code>notangle</code> is required. Some Linux distributions include this
command in package <strong>noweb</strong>. It can also be installed from the
-sources at <a href="https://www.cs.tufts.edu/~nr/noweb/">https://www.cs.tufts.edu/~nr/noweb/</a><a name="DOCF62" href="#FOOT62"><sup>62</sup></a>. The package
+sources at <a href="https://www.cs.tufts.edu/~nr/noweb/">https://www.cs.tufts.edu/~nr/noweb/</a><a name="DOCF67" href="#FOOT67"><sup>67</sup></a>. The package
sources are only re-created even in maintainer mode if
<samp>src/library/compiler/noweb/compiler.nw</samp> has been updated.
</p>
@@ -4653,7 +4701,7 @@ selection issues, they are more amenable than the issues with
</p>
<p>When X11 was designed, most displays were around 75dpi, whereas today
they are of the order of 100dpi or more. If you find that X11()
-is reporting<a name="DOCF63" href="#FOOT63"><sup>63</sup></a> missing font sizes, especially larger ones, it is likely
+is reporting<a name="DOCF68" href="#FOOT68"><sup>68</sup></a> missing font sizes, especially larger ones, it is likely
that you are not using scalable fonts and have not installed the 100dpi
versions of the X11 fonts. The names and details differ by system, but
will likely have something like Fedora&rsquo;s
@@ -4731,7 +4779,7 @@ directory or elsewhere, for example,
<p>Linux is the main development platform for R, so compilation from the
sources is normally straightforward with the standard compilers and
-libraries.<a name="DOCF64" href="#FOOT64"><sup>64</sup></a>
+libraries.<a name="DOCF69" href="#FOOT69"><sup>69</sup></a>
</p>
<p>Remember that some package management systems (such as <acronym>RPM</acronym> and
deb) make a distinction between the user version of a package and the
@@ -4772,7 +4820,7 @@ significant performance improvements on recent CPUs (especially for
the best possible performance on the machine on which R is being
installed: if the compilation is for a site-wide installation, it may
still be desirable to use something like
-<samp>-mtume=core2</samp>.<a name="DOCF65" href="#FOOT65"><sup>65</sup></a> It is also possible to increase the
+<samp>-mtume=core2</samp>.<a name="DOCF70" href="#FOOT70"><sup>70</sup></a> It is also possible to increase the
optimization levels to <samp>-O3</samp>: however for many versions of the
compilers this has caused problems in at least one <acronym>CRAN</acronym>
package.
@@ -4785,7 +4833,7 @@ package.
<p>is appropriate since most (but not all) software installs its 64-bit
libraries in <samp>/usr/local/lib64</samp>. To build a 32-bit version of R
-on &lsquo;<samp>x86_64</samp>&rsquo; with Fedora 24 we used
+on &lsquo;<samp>x86_64</samp>&rsquo; with Fedora 26 we used
</p>
<div class="example">
<pre class="example">CC=&quot;gcc -m32&quot;
@@ -4809,7 +4857,7 @@ may also be necessary to set the <code>pkg-config</code> path, e.g. by
<p>The 32-bit system <code>libcurl</code> did not work with the system CA
certificates: this is worked around in R&rsquo;s test suite.
</p>
-<p>64-bit versions of Linux are built with support for files &gt; 2Gb, and
+<p>64-bit versions on Linux are built with support for files &gt; 2Gb, and
32-bit versions will be if possible unless <samp>--disable-largefile</samp>
is specified.
</p>
@@ -4832,6 +4880,20 @@ FFLAGS=&quot;-mminimal-toc -fno-optimize-sibling-calls -g -O2&quot;
<p>the additional flags being needed to resolve problems linking against
<samp>libnmath.a</samp> and when linking R as a shared library.
</p>
+<p>The setting of the macro &lsquo;<samp>SAFE_FFLAGS</samp>&rsquo; may need some help. It
+should not need additional flags on platforms other than &lsquo;<samp>68000</samp>&rsquo;
+(not likely to be encountered) and &lsquo;<samp>ix86</samp>&rsquo; (and not
+&lsquo;<samp>x86_64</samp>&rsquo;). When the FORTRAN compiler is GNU (<code>gfortran</code>
+or possibly <code>g77</code>) the flags
+</p><div class="example">
+<pre class="example">-msse2 -mfpmath=sse
+</pre></div>
+<p>are added: earlier versions of R added <samp>-ffloat-store</samp> and
+this might still be needed if a &lsquo;<samp>ix86</samp>&rsquo; CPU is encountered
+without SSE2 support. Note that it is a <em>replacement</em> for
+&lsquo;<samp>FFLAGS</samp>&rsquo;, so should include all the flags in that macro (except
+perhaps the optimization level).
+</p>
<hr>
<a name="Clang"></a>
@@ -4854,9 +4916,38 @@ project (<a href="http://libcxx.llvm.org/">http://libcxx.llvm.org/</a>, Fedora R
has also been tested: for some R packages only the variant using
<code>libcxxabi</code> was successful.
</p>
-<p>Earlier builds of <code>clang</code> have no OpenMP support, those of
-versions 3.7.0 or later may.<a name="DOCF66" href="#FOOT66"><sup>66</sup></a>
+<p>Recent versions have (optional when built) OpenMP support.<a name="DOCF71" href="#FOOT71"><sup>71</sup></a>
+</p>
+<p>There is a project called <code>flang</code>
+(<a href="https://github.com/flang-compiler/flang">https://github.com/flang-compiler/flang</a>)) to develop a
+Fortran compiler similar to clang but based on the Portland Group&rsquo;s front
+end. This needs something like
+</p><div class="example">
+<pre class="example">FC=/usr/local/flang/bin/flang
+F77=/usr/local/flang/bin/flang
+LDFLAGS=&quot;-L/usr/local/flang/lib -L/usr/local/lib64&quot;
+</pre></div>
+<p>and in earlier versions of R it may be necessary to set
+</p><div class="example">
+<pre class="example">FCPICFLAGS=-fpic
+FPICFLAGS=-fpic
+</pre></div>
+
+<p>Note that <code>flang</code> accepts all the flags which <code>clang</code>
+does (the driver is a modified version of <code>clang</code>, and
+<code>flang</code> is a symbolic link to <code>clang</code>), but does not
+implement all of them for Fortran compilation: it also accepts most
+PGI-style flags such as <samp>-mp</samp> for OpenMP. It currently produces
+few diagnostics even with <samp>-Wall -pedantic</samp>.
+</p>
+<p><code>flang</code>&rsquo;s Fortran runtime is compiled against OpenMP and it
+seems this conflicts with using OpenMP in R. So it may be necessary
+to disable the latter by configuring using <samp>--without-openmp</samp>.
</p>
+<p>It is not clear what architectures <code>flang</code> intends to support:
+experiments were done on &lsquo;<samp>x86_64</samp>&rsquo;.
+</p>
+
<hr>
<a name="Intel-compilers"></a>
<a name="Intel-compilers-1"></a>
@@ -4909,6 +5000,13 @@ FC=$F77
FCFLAGS=$F77FLAGS
</pre></div>
+<p>It is possible that 32-builds need to force the use of SSE2 instructions
+in <code>SAFE_FFLAGS</code>, e.g. by
+</p><div class="example">
+<pre class="example">SAFE_FFLAGS=-axsse2
+</pre></div>
+
+
<hr>
<a name="macOS"></a>
<a name="macOS-2"></a>
@@ -4919,7 +5017,7 @@ FCFLAGS=$F77FLAGS
</p>
<p>The instructions here are for &lsquo;<samp>x86_64</samp>&rsquo; builds on 10.11 (El
Capitan) or later. R can be built for 10.9 and 10.10 and in
-principle<a name="DOCF67" href="#FOOT67"><sup>67</sup></a> for 10.6 to 10.8.
+principle<a name="DOCF72" href="#FOOT72"><sup>72</sup></a> for 10.6 to 10.8.
</p>
<p>To build R you need Apple&rsquo;s &lsquo;Command Line Tools&rsquo;: these can be
(re-)installed by <code>xcode-select --install</code>. (If you have a
@@ -4928,7 +5026,7 @@ offer the installation of the command-line tools. If you have installed
Xcode, this provides the command-line tools. The tools will need to be
reinstalled when macOS is upgraded, as upgrading partially removes them.)
</p>
-<p>You need GNU <code>readline</code><a name="DOCF68" href="#FOOT68"><sup>68</sup></a> That and other
+<p>You need GNU <code>readline</code><a name="DOCF73" href="#FOOT73"><sup>73</sup></a> That and other
binary components are available from
<a href="https://r.research.att.com/libs">https://r.research.att.com/libs</a>: you will need <code>pcre</code> and
<code>xz</code> (for <code>libzma</code>) as recent macOS versions provide libraries
@@ -4949,7 +5047,7 @@ for versions up to Sierra, although High Sierra has 8.40).
becomes the default device when running R at the console and X11
would only be used for the command-line-R data editor/viewer and one
version of Tcl/Tk. (This option needs an Objective-C
-compiler<a name="DOCF69" href="#FOOT69"><sup>69</sup></a> which can
+compiler<a name="DOCF74" href="#FOOT74"><sup>74</sup></a> which can
compile the source code of <code>quartz()</code>.)
</p>
<p>Use <samp>--without-aqua</samp> if you want a standard Unix-alike build:
@@ -4976,7 +5074,7 @@ FCFLAGS=$F77FLAGS
and the Fortran compiler from one of the packages described in the next
paragraph.
</p>
-<p>There are installers<a name="DOCF70" href="#FOOT70"><sup>70</sup></a> for Fortran compilers for El Capitan and Sierra at
+<p>There are installers<a name="DOCF75" href="#FOOT75"><sup>75</sup></a> for Fortran compilers for El Capitan and Sierra at
<a href="http://coudert.name/software/gfortran-6.1-ElCapitan.dmg">http://coudert.name/software/gfortran-6.1-ElCapitan.dmg</a> and
<a href="http://coudert.name/software/gfortran-6.3-Sierra.dmg">http://coudert.name/software/gfortran-6.3-Sierra.dmg</a>. (These
compilers are also available from a <code>CRAN</code> mirror: select &lsquo;Other&rsquo;
@@ -5000,13 +5098,13 @@ FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0
</p>
<p>More recent and complete distributions of <code>clang</code> are often
available from <a href="http://llvm.org/releases/">http://llvm.org/releases/</a>: for example at the time
-of writing of 5.0.0 built for Sierra or later. In particular, these
-should include support for OpenMP. Another build of clang 4.0.0 is
-available at
-<a href="https://r.research.att.com/libs/clang-4.0.0-darwin15.6-Release.tar.gz">https://r.research.att.com/libs/clang-4.0.0-darwin15.6-Release.tar.gz</a>.
-Suppose one of these distributions is installed under
-<samp>/usr/local/clang4</samp>. Then R could be configured by something
-like
+of writing<a name="DOCF76" href="#FOOT76"><sup>76</sup></a> of 5.0.1
+and 6.0.0. In particular, these include support for OpenMP. Another
+build of clang 4.0.0 with OpenMP is available at
+<a href="https://r.research.att.com/libs/clang-4.0.0-darwin15.6-Release.tar.gz">https://r.research.att.com/libs/clang-4.0.0-darwin15.6-Release.tar.gz</a>
+and used for the <acronym>CRAN</acronym> binary distributions. Suppose one of
+these distributions is installed under <samp>/usr/local/clang4</samp>. Then
+R could be configured by something like
</p><div class="example">
<pre class="example">./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib \
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig \
@@ -5050,14 +5148,22 @@ example by setting
</p>
<a name="index-BLAS-library-1"></a>
<a name="index-LAPACK-library-1"></a>
-<p>The <code>Accelerate</code> library can be used <em>via</em> the configuration options
+<p>The <code>Accelerate</code>
+library<a name="DOCF77" href="#FOOT77"><sup>77</sup></a>
+can be used <em>via</em> the configuration options
</p>
<div class="example">
-<pre class="example">--with-blas=&quot;-framework Accelerate&quot; --with-lapack
+<pre class="example">--with-blas=&quot;-framework Accelerate&quot;
</pre></div>
<p>to provide potentially higher-performance versions of the <acronym>BLAS</acronym>
-and LAPACK routines.<a name="DOCF71" href="#FOOT71"><sup>71</sup></a>
+and LAPACK routines.<a name="DOCF78" href="#FOOT78"><sup>78</sup></a> This also includes a
+full LAPACK which can be used <em>via</em> <samp>--with-lapack</samp>:
+however, the version of LAPACK it contains is currently seriously old
+(&lsquo;<samp>3.2.1</samp>&rsquo; in macOS 10.13.2).
+</p>
+<p>In recent versions of macOS, threading in Accelerate is controlled by
+&lsquo;Grand Central Dispatch&rsquo; and is said not to need user control.
</p>
<p>Looking at the top of
<samp>/Library/Frameworks/R.framework/Resources/etc/Makeconf</samp>
@@ -5078,7 +5184,7 @@ times before 1902 or after 2037 (despite using a 64-bit <code>time_t</code>).
5GB, but a smaller version (&lsquo;Basic TeX&rsquo;) is available at
<a href="https://www.tug.org/mactex/morepackages.html">https://www.tug.org/mactex/morepackages.html</a> to which you will
need to add some packages, e.g. for the 2017 version we needed to
-add<a name="DOCF72" href="#FOOT72"><sup>72</sup></a> <strong>cm-super</strong>, <strong>helvetic</strong>,
+add<a name="DOCF79" href="#FOOT79"><sup>79</sup></a> <strong>cm-super</strong>, <strong>helvetic</strong>,
<strong>inconsolata</strong> and <strong>texinfo</strong> which brought this to about 310MB.
&lsquo;<samp>TeX Live Utility</samp>&rsquo; (available <em>via</em> the MacTeX front page)
provides a graphical means to manage TeX packages.
@@ -5132,9 +5238,6 @@ with
--with-tk-config=/Library/Frameworks/Tk.framework/tkConfig.sh
</pre></div>
-<p>(for the versions bundled with macOS, use paths starting with
-<samp>/System/Library</samp>).
-</p>
<p>If you need to find out which distribution of Tk is in use at run time,
use
</p><div class="example">
@@ -5147,21 +5250,23 @@ tclvalue(.Tcl(&quot;tk windowingsystem&quot;)) # &quot;x11&quot; or &quot;aqua&
<a name="Java"></a>
<h4 class="subsection">C.3.2 Java</h4>
-<p>The situation with Java support on macOS is messy.<a name="DOCF73" href="#FOOT73"><sup>73</sup></a> As from
+<p>The situation with Java support on macOS is messy.<a name="DOCF80" href="#FOOT80"><sup>80</sup></a> As from
R 3.4.0 the <acronym>CRAN</acronym> distribution of <a href="https://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> requires
-Java 8 (aka 1.8).
+Java 8.
</p>
<p>macOS no longer comes with an installed Java runtime (JRE), and a macOS
upgrade may remove one if already installed: it is intended to be
installed at first use. Check if a JRE is installed by running
<code>java -version</code> in a <code>Terminal</code> window: if Java is not
-installed<a name="DOCF74" href="#FOOT74"><sup>74</sup></a>
-this should prompt you to install it. You can also install directly the
-latest Java from Oracle (currently from
-<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a>).
+installed<a name="DOCF81" href="#FOOT81"><sup>81</sup></a>
+this should prompt you to install it. You can also install directly a
+recent Java from Oracle (currently from
+<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a>:
+note that Java 9 has a limited lifetime and at the time of writing
+<a href="https://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> did not install with Java 10).
</p>
<p>Binary distributions of R are built against a specific version (e.g.
-1.8.0_121) of Oracle Java so <code>sudo R CMD javareconf</code> may be
+1.8.0_161) of Oracle Java so <code>sudo R CMD javareconf</code> may be
needed before using Java-using packages.
</p>
@@ -5180,7 +5285,7 @@ JRE.
need some help, e.g. by setting <code>JAVA_HOME</code>. An Oracle JDK can
be specified explicitly by something like
</p><div class="example">
-<pre class="example">JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
+<pre class="example">JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
JAVA_CPPFLAGS=&quot;-I/${JAVA_HOME}/include -I/${JAVA_HOME}/include/darwin&quot;
JAVA_LD_LIBRARY_PATH=&quot;${JAVA_HOME}/jre/lib/server&quot;
JAVA_LIBS=&quot;-L/${JAVA_HOME}/jre/lib/server -ljvm&quot;
@@ -5221,7 +5326,7 @@ selected by the option
</pre></div>
<p>(This is intended to be used with an Apple toolchain: others may not
-support frameworks correctly but that from <code>llvm.org</code> does.)
+support frameworks correctly but those from <code>llvm.org</code> do.)
</p>
<p>It is only needed if you want to build R for use with the <small>R.APP</small>
console, and implies <samp>--enable-R-shlib</samp> to build R as a
@@ -5278,11 +5383,11 @@ in the <samp>/Applications</samp> folder.
<p>R has been built successfully on Solaris 10 using the (zero cost)
-Oracle Developer Studio<a name="DOCF75" href="#FOOT75"><sup>75</sup></a> compilers: there has been some success with
+Oracle Developer Studio<a name="DOCF82" href="#FOOT82"><sup>82</sup></a> compilers: there has been some success with
<code>gcc</code>/<code>gfortran</code>. (Recent Sun machines are AMD Opterons
or Intel Xeons (&lsquo;<samp>amd64</samp>&rsquo;) rather than &lsquo;<samp>x86</samp>&rsquo;, but 32-bit
&lsquo;<samp>x86</samp>&rsquo; executables are the default.) How these compilers
-identify<a name="DOCF76" href="#FOOT76"><sup>76</sup></a> themselves is slightly
+identify<a name="DOCF83" href="#FOOT83"><sup>83</sup></a> themselves is slightly
confusing: Solaris Studio versions 12.3 and 12.4 report C++ 5.12 and
5.13, and Developer Studio 12.5 reports C++ 5.14. We will only consider
12.5 (May 2016): instructions for 12.3 can be found in versions of this
@@ -5410,7 +5515,7 @@ selected as LAPACK <em>via</em>
</pre></div>
<p>This has often given test failures in the past, in several different
-places.<a name="DOCF77" href="#FOOT77"><sup>77</sup></a>
+places.<a name="DOCF84" href="#FOOT84"><sup>84</sup></a>
</p>
<p>Parsing very complex R expressions needs a lot of stack space when
the Oracle compilers are used: several packages require the stack
@@ -5471,7 +5576,7 @@ version of Solaris in use. (This can be ascertained from <code>gcc
several reports of problems were due to using <code>gcc</code> compiled on
one version of Solaris on a later version. Note that this can even
apply to OS patches: some 2016 patches to Solaris 10 changed its C
-header files in way incompatible<a name="DOCF78" href="#FOOT78"><sup>78</sup></a> with the modified versions included with OpenCSW&rsquo;s
+header files in way incompatible<a name="DOCF85" href="#FOOT85"><sup>85</sup></a> with the modified versions included with OpenCSW&rsquo;s
binary distribution.
</p>
<p>The notes here are for <code>gcc</code> set up to use the Solaris linker:
@@ -5507,7 +5612,7 @@ LDFLAGS=&quot;-L/opt/csw/lib/amd64 -L/usr/local/lib/amd64&quot;
<p>Note that paths such as <samp>/opt/csw/lib</samp>, <samp>/usr/local/lib/amd64</samp>
and <samp>/opt/csw/lib/amd64</samp> may need to be in the
-<a name="index-LD_005fLIBRARY_005fPATH-4"></a>
+<a name="index-LD_005fLIBRARY_005fPATH-3"></a>
<code>LD_LIBRARY_PATH</code> during configuration.
</p>
@@ -5768,7 +5873,7 @@ will not need to build add-on packages from source; see <a href="#Add_002don-pac
</p>
<p>We have found that the build process for R is quite sensitive to
the choice of tools: please follow our instructions <strong>exactly</strong>,
-even to the choice of particular versions of the tools.<a name="DOCF79" href="#FOOT79"><sup>79</sup></a> The build process for add-on packages is somewhat more
+even to the choice of particular versions of the tools.<a name="DOCF86" href="#FOOT86"><sup>86</sup></a> The build process for add-on packages is somewhat more
forgiving, but we recommend using the exact toolset at first, and only
substituting other tools once you are familiar with the process.
</p>
@@ -5821,7 +5926,7 @@ use filepaths containing spaces: you can always use the short forms
<p>It is essential that the directory containing the command line tools
comes first or second in the path: there are typically like-named
-tools<a name="DOCF80" href="#FOOT80"><sup>80</sup></a> in other directories, and they will <strong>not</strong>
+tools<a name="DOCF87" href="#FOOT87"><sup>87</sup></a> in other directories, and they will <strong>not</strong>
work. The ordering of the other directories is less important, but if in
doubt, use the order above.
</p>
@@ -5870,7 +5975,7 @@ install LaTeX packages on first use.
<a name="The-Inno-Setup-installer-1"></a>
<h3 class="section">D.2 The Inno Setup installer</h3>
-<p>To make the installer package (<samp>R-3.4.3-win.exe</samp>) we
+<p>To make the installer package (<samp>R-3.4.4-win.exe</samp>) we
currently require the Unicode version of Inno Setup 5.3.7 or later from
<a href="http://jrsoftware.org/">http://jrsoftware.org/</a>. This is <em>not</em> included in
<samp>Rtools*.exe</samp>.
@@ -6214,10 +6319,9 @@ be used to (de)compress files with that form of compression.
<tr><td></td><td valign="top"><a href="#index-LC_005fCOLLATE"><code>LC_COLLATE</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Testing-a-Unix_002dalike-Installation">Testing a Unix-alike Installation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LC_005fMESSAGES"><code>LC_MESSAGES</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Localization-of-messages">Localization of messages</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH"><code>LD_LIBRARY_PATH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Unix_002dalike-standalone">Unix-alike standalone</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-1"><code>LD_LIBRARY_PATH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#ACML">ACML</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-2"><code>LD_LIBRARY_PATH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Using-FORTRAN">Using FORTRAN</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-3"><code>LD_LIBRARY_PATH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Compile-and-load-flags">Compile and load flags</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-4"><code>LD_LIBRARY_PATH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Using-gcc">Using gcc</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-1"><code>LD_LIBRARY_PATH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Using-FORTRAN">Using FORTRAN</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-2"><code>LD_LIBRARY_PATH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Compile-and-load-flags">Compile and load flags</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-3"><code>LD_LIBRARY_PATH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Using-gcc">Using gcc</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LOCAL_005fSOFT"><code>LOCAL_SOFT</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Windows-packages">Windows packages</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Environment-variable-index_en_letter-O">O</a></th><td></td><td></td></tr>
@@ -6331,264 +6435,287 @@ layout is described here.</p>
<samp>src/extra/tzone/Notes</samp> in the R sources.</p>
<h3><a name="FOOT11" href="#DOCF11">(11)</a></h3>
<p>for example, <samp>-fopenmp</samp>, <samp>-xopenmp</samp> or
-<samp>-qopenmp</samp>. This includes for <code>clang</code> 3.7.x and the
-Intel C compiler.</p>
+<samp>-qopenmp</samp>. This includes for <code>clang</code> and the Intel C
+compiler.</p>
<h3><a name="FOOT12" href="#DOCF12">(12)</a></h3>
+<p>This does not necessarily disable <em>use</em> of
+OpenMP &ndash; the <code>configure</code> code allows for platforms where OpenMP
+is used without a flag. For the <code>flang</code> compiler in late 2017,
+the Fortran runtime always used OpenMP.</p>
+<h3><a name="FOOT13" href="#DOCF13">(13)</a></h3>
<p>Currently this is a valid option for
<code>g++</code> 5 and later and 2016 versions of the Intel and Solaris
compilers. For earlier versions of <code>g++</code> one could try
<samp>-std=c++1y</samp>.</p>
-<h3><a name="FOOT13" href="#DOCF13">(13)</a></h3>
+<h3><a name="FOOT14" href="#DOCF14">(14)</a></h3>
<p>This is true for earlier versions of <code>g++</code> such
as 4.2.1, and also for commonly-used versions of the Solaris compiler
<code>CC</code>.</p>
-<h3><a name="FOOT14" href="#DOCF14">(14)</a></h3>
+<h3><a name="FOOT15" href="#DOCF15">(15)</a></h3>
<p>Currently only
GCC 6 and later, but this has been mooted for others.</p>
-<h3><a name="FOOT15" href="#DOCF15">(15)</a></h3>
+<h3><a name="FOOT16" href="#DOCF16">(16)</a></h3>
<p>For when features were
supported, see
<a href="https://gcc.gnu.org/projects/cxx-status.html#cxx11">https://gcc.gnu.org/projects/cxx-status.html#cxx11</a>.</p>
-<h3><a name="FOOT16" href="#DOCF16">(16)</a></h3>
+<h3><a name="FOOT17" href="#DOCF17">(17)</a></h3>
<p>Suitable distributions include
Strawberry Perl, <a href="http://strawberryperl.com/">http://strawberryperl.com/</a> and ActivePerl,
<a href="https://www.activestate.com/activeperl">https://www.activestate.com/activeperl</a>.</p>
-<h3><a name="FOOT17" href="#DOCF17">(17)</a></h3>
+<h3><a name="FOOT18" href="#DOCF18">(18)</a></h3>
<p>The installer as puts links to <code>R</code> and
<code>Rscript</code> in <samp>/usr/local/bin</samp>. If these are missing, you
can run directly the copies in
<samp>/Library/Frameworks/R.framework/Resources/</samp>.</p>
-<h3><a name="FOOT18" href="#DOCF18">(18)</a></h3>
+<h3><a name="FOOT19" href="#DOCF19">(19)</a></h3>
<p>The
framework for R 3.3.x was named
<code>org.r-project.R.mavericks.fw.pkg</code>: use <code>pkgutil --pkgs |
grep org.r-project</code> to check for earlier versions of R.</p>
-<h3><a name="FOOT19" href="#DOCF19">(19)</a></h3>
-<p>More precisely,
-of the package of the same name: this means that installing a package for
-3.3.x does 3.4.x does not remove an installation of the other series.</p>
<h3><a name="FOOT20" href="#DOCF20">(20)</a></h3>
-<p>unless they were excluded in the build.</p>
+<p>More precisely,
+of the Apple package of the same name: this means that installing a package for
+3.3.x does not remove an installation for 3.4.x or later.</p>
<h3><a name="FOOT21" href="#DOCF21">(21)</a></h3>
+<p>unless they were excluded in the build.</p>
+<h3><a name="FOOT22" href="#DOCF22">(22)</a></h3>
<p>its binding is locked once the startup files have been
read, so users cannot easily change it.</p>
-<h3><a name="FOOT22" href="#DOCF22">(22)</a></h3>
+<h3><a name="FOOT23" href="#DOCF23">(23)</a></h3>
<p>If a proxy needs to be set, see
<code>?download.file</code>.</p>
-<h3><a name="FOOT23" href="#DOCF23">(23)</a></h3>
+<h3><a name="FOOT24" href="#DOCF24">(24)</a></h3>
<p>for a small number of
<acronym>CRAN</acronym> packages where this is known to be safe and is needed by
the autobuilder this is the default. Look at the source of
<samp>tools:::.install_packages</samp> for the list. It can also be specified
in the package&rsquo;s <samp>DESCRIPTION</samp> file.</p>
-<h3><a name="FOOT24" href="#DOCF24">(24)</a></h3>
+<h3><a name="FOOT25" href="#DOCF25">(25)</a></h3>
<p>or by adding it in a file such as
<samp>etc/i386/Makevars.site</samp>, which does not exist by default.</p>
-<h3><a name="FOOT25" href="#DOCF25">(25)</a></h3>
+<h3><a name="FOOT26" href="#DOCF26">(26)</a></h3>
<p>Note that capitalization and version may differ from
the Open Source project.</p>
-<h3><a name="FOOT26" href="#DOCF26">(26)</a></h3>
+<h3><a name="FOOT27" href="#DOCF27">(27)</a></h3>
<p>using a path containing spaces is likely to cause
problems</p>
-<h3><a name="FOOT27" href="#DOCF27">(27)</a></h3>
+<h3><a name="FOOT28" href="#DOCF28">(28)</a></h3>
<p>They need to have been
created using <samp>-headerpad_max_install_names</samp>, which is the
default for an R package.</p>
-<h3><a name="FOOT28" href="#DOCF28">(28)</a></h3>
+<h3><a name="FOOT29" href="#DOCF29">(29)</a></h3>
<p>&lsquo;X/Open Portability Guide&rsquo;, which has
had several versions.</p>
-<h3><a name="FOOT29" href="#DOCF29">(29)</a></h3>
+<h3><a name="FOOT30" href="#DOCF30">(30)</a></h3>
<p>On some systems setting
<code>LC_ALL</code> or <code>LC_MESSAGES</code> to &lsquo;<samp>C</samp>&rsquo; disables <code>LANGUAGE</code>.</p>
-<h3><a name="FOOT30" href="#DOCF30">(30)</a></h3>
+<h3><a name="FOOT31" href="#DOCF31">(31)</a></h3>
<p>If you try changing from French
to Russian except in a UTF-8 locale, you will most likely find messages
change to English.</p>
-<h3><a name="FOOT31" href="#DOCF31">(31)</a></h3>
+<h3><a name="FOOT32" href="#DOCF32">(32)</a></h3>
<p>the
language written in England: some people living in the USA appropriate
this name for their language.</p>
-<h3><a name="FOOT32" href="#DOCF32">(32)</a></h3>
+<h3><a name="FOOT33" href="#DOCF33">(33)</a></h3>
<p>with
Americanisms.</p>
-<h3><a name="FOOT33" href="#DOCF33">(33)</a></h3>
+<h3><a name="FOOT34" href="#DOCF34">(34)</a></h3>
<p>also
known as <acronym>IEEE</acronym>&nbsp;754</p>
-<h3><a name="FOOT34" href="#DOCF34">(34)</a></h3>
+<h3><a name="FOOT35" href="#DOCF35">(35)</a></h3>
<p>at least when storing quantities: the
on-FPU precision is allowed to vary</p>
-<h3><a name="FOOT35" href="#DOCF35">(35)</a></h3>
-<p>e.g. Bessel, beta and gamma functions</p>
<h3><a name="FOOT36" href="#DOCF36">(36)</a></h3>
+<p>e.g. Bessel, beta and gamma functions</p>
+<h3><a name="FOOT37" href="#DOCF37">(37)</a></h3>
<p>including copying <samp>MkRules.dist</samp> to
<samp>MkRule.local</samp> and selecting the architecture.</p>
-<h3><a name="FOOT37" href="#DOCF37">(37)</a></h3>
+<h3><a name="FOOT38" href="#DOCF38">(38)</a></h3>
<p>also known as
<acronym>IEEE</acronym>&nbsp;754</p>
-<h3><a name="FOOT38" href="#DOCF38">(38)</a></h3>
+<h3><a name="FOOT39" href="#DOCF39">(39)</a></h3>
<p>Note
that C11 compilers need not be C99-compliant: R requires support for
<code>double complex</code> and variable-length arrays which are optional in
C11 but is mandatory in C99.</p>
-<h3><a name="FOOT39" href="#DOCF39">(39)</a></h3>
+<h3><a name="FOOT40" href="#DOCF40">(40)</a></h3>
<p>Examples are <samp>-std=gnu99</samp>, <samp>-std=c99</samp> and
<samp>-c99</samp>.</p>
-<h3><a name="FOOT40" href="#DOCF40">(40)</a></h3>
+<h3><a name="FOOT41" href="#DOCF41">(41)</a></h3>
<p><samp>-std=c99</samp> excludes POSIX
functionality, but <samp>config.h</samp> will turn on all <acronym>GNU</acronym>
extensions to include the POSIX functionality for R itself: this does
not apply to badly-written packages. The default mode for GCC 5.1 and
later is <samp>-std=gnu11</samp>, which currently includes the optional
features R needs.</p>
-<h3><a name="FOOT41" href="#DOCF41">(41)</a></h3>
+<h3><a name="FOOT42" href="#DOCF42">(42)</a></h3>
<p>However, it is possible to break
the default behaviour of <code>glibc</code> by re-specifying the <code>gconv</code>
modules to be loaded.</p>
-<h3><a name="FOOT42" href="#DOCF42">(42)</a></h3>
+<h3><a name="FOOT43" href="#DOCF43">(43)</a></h3>
<p>specifically, the C99
functionality of headers <samp>wchar.h</samp> and <samp>wctype.h</samp>, types
<code>wctans_t</code> and <code>mbstate_t</code> and functions <code>mbrtowc</code>,
<code>mbstowcs</code>, <code>wcrtomb</code>, <code>wcscoll</code>, <code>wcstombs</code>,
<code>wctrans</code>, <code>wctype</code>, and <code>iswctype</code>.</p>
-<h3><a name="FOOT43" href="#DOCF43">(43)</a></h3>
+<h3><a name="FOOT44" href="#DOCF44">(44)</a></h3>
<p>including <code>opendir</code>, <code>readdir</code>,
<code>closedir</code>, <code>popen</code>, <code>stat</code>, <code>glob</code>, <code>access</code>,
<code>getcwd</code> and <code>chdir</code> system calls, <code>select</code> on a
Unix-alike, and either <code>putenv</code> or <code>setenv</code>.</p>
-<h3><a name="FOOT44" href="#DOCF44">(44)</a></h3>
-<p>such as <code>realpath</code>, <code>symlink</code>.</p>
<h3><a name="FOOT45" href="#DOCF45">(45)</a></h3>
+<p>such as <code>realpath</code>, <code>symlink</code>.</p>
+<h3><a name="FOOT46" href="#DOCF46">(46)</a></h3>
<p>most often distributed as part of <code>xz</code>:
possible names in Linux distributions include
<code>xz-devel</code>/<code>xz-libs</code> and <code>liblzma-dev</code>.</p>
-<h3><a name="FOOT46" href="#DOCF46">(46)</a></h3>
+<h3><a name="FOOT47" href="#DOCF47">(47)</a></h3>
<p>sometimes known as PCRE1, and not PCRE2 which started at
version 10.0.</p>
-<h3><a name="FOOT47" href="#DOCF47">(47)</a></h3>
+<h3><a name="FOOT48" href="#DOCF48">(48)</a></h3>
<p>but not a major
version greater than 7 should there ever be one: the major version has
been 7 since 2000.</p>
-<h3><a name="FOOT48" href="#DOCF48">(48)</a></h3>
+<h3><a name="FOOT49" href="#DOCF49">(49)</a></h3>
<p>for
example to specify static linking with a build which has both shared and
static libraries.</p>
-<h3><a name="FOOT49" href="#DOCF49">(49)</a></h3>
+<h3><a name="FOOT50" href="#DOCF50">(50)</a></h3>
<p>Such as
<acronym>GNU</acronym> <code>tar</code> 1.15 or later, <code>bsdtar</code> (from
<a href="https://github.com/libarchive/libarchive/">https://github.com/libarchive/libarchive/</a>, as used by FreeBSD and OS
X 10.6 and later) or <code>tar</code> from the Heirloom Toolchest
(<a href="http://heirloom.sourceforge.net/tools.html">http://heirloom.sourceforge.net/tools.html</a>).</p>
-<h3><a name="FOOT50" href="#DOCF50">(50)</a></h3>
+<h3><a name="FOOT51" href="#DOCF51">(51)</a></h3>
<p><code>texi2dvi</code> is normally a shell
script. Some versions (including that from <strong>texinfo</strong> 5.2 and 6.0)
need to be run under <code>bash</code> rather than a Bourne shell,
especially on Solaris. Some of the issues which have been observed with
broken versions of <code>texi2dvi</code> can be circumvented by setting the
environment variable <code>R_TEXI2DVICMD</code> to the value <code>emulation</code>.</p>
-<h3><a name="FOOT51" href="#DOCF51">(51)</a></h3>
+<h3><a name="FOOT52" href="#DOCF52">(52)</a></h3>
<p>If necessary the path to
<code>pkg-config</code> can be specified by setting <code>PKGCONF</code> in
<samp>config.site</samp>, on the <code>configure</code> command line or in the
environment.</p>
-<h3><a name="FOOT52" href="#DOCF52">(52)</a></h3>
+<h3><a name="FOOT53" href="#DOCF53">(53)</a></h3>
<p>also known as <code>ttf-mscorefonts-installer</code> in the
Debian/Ubuntu world: see also
<a href="https://en.wikipedia.org/wiki/Core_fonts_for_the_Web">https://en.wikipedia.org/wiki/Core_fonts_for_the_Web</a>.</p>
-<h3><a name="FOOT53" href="#DOCF53">(53)</a></h3>
+<h3><a name="FOOT54" href="#DOCF54">(54)</a></h3>
<p><code>ttf-liberation</code>
in Debian/Ubuntu.</p>
-<h3><a name="FOOT54" href="#DOCF54">(54)</a></h3>
+<h3><a name="FOOT55" href="#DOCF55">(55)</a></h3>
+<p>This is the default as
+from <code>glibc</code> 2.26 and has been announced for Fedora 28.</p>
+<h3><a name="FOOT56" href="#DOCF56">(56)</a></h3>
<p>This is true even for
the &lsquo;Aqua&rsquo; version of Tk on macOS, but distributions of that include a
copy of the X11 files needed.</p>
-<h3><a name="FOOT55" href="#DOCF55">(55)</a></h3>
+<h3><a name="FOOT57" href="#DOCF57">(57)</a></h3>
<p>Using the Oracle Developer Studio
<code>cc</code> and <code>f95</code> compilers</p>
-<h3><a name="FOOT56" href="#DOCF56">(56)</a></h3>
-<p>and &lsquo;<samp>i686</samp>&rsquo; for earlier
-versions.</p>
-<h3><a name="FOOT57" href="#DOCF57">(57)</a></h3>
+<h3><a name="FOOT58" href="#DOCF58">(58)</a></h3>
+<p>There were others for earlier
+versions of ATLAS, and are for non-Intel architectures. The only way to
+see exactly which CPUs the distributed libraries have been tuned for is
+to read the <samp>atlas.spec</samp> file: at the time of writing
+&lsquo;<samp>HAMMER64SSE3</samp>&rsquo; and &lsquo;<samp>Corei264AVX</samp>&rsquo; for &lsquo;<samp>x86_64</samp>&rsquo; Fedora.</p>
+<h3><a name="FOOT59" href="#DOCF59">(59)</a></h3>
+<p><a href="http://math-atlas.sourceforge.net/atlas_install/">http://math-atlas.sourceforge.net/atlas_install/</a></p>
+<h3><a name="FOOT60" href="#DOCF60">(60)</a></h3>
+<p><a href="http://math-atlas.sourceforge.net/faq.html#tnum">http://math-atlas.sourceforge.net/faq.html#tnum</a></p>
+<h3><a name="FOOT61" href="#DOCF61">(61)</a></h3>
+<p>(and more, e.g. for 64-bit ints and static versions).</p>
+<h3><a name="FOOT62" href="#DOCF62">(62)</a></h3>
<p>We have measured 15&ndash;20% on &lsquo;<samp>i686</samp>&rsquo; Linux
and around 10% on &lsquo;<samp>x86_64</samp>&rsquo; Linux.</p>
-<h3><a name="FOOT58" href="#DOCF58">(58)</a></h3>
+<h3><a name="FOOT63" href="#DOCF63">(63)</a></h3>
<p>We believe that
-versions 3.4.0 to 3.10.1 are compatible.</p>
-<h3><a name="FOOT59" href="#DOCF59">(59)</a></h3>
+versions 3.4.0 to 3.13.0 are compatible.</p>
+<h3><a name="FOOT64" href="#DOCF64">(64)</a></h3>
<p>On HP-UX <code>fort77</code> is the
<acronym>POSIX</acronym> compliant FORTRAN compiler, and comes after
<code>g77</code>.</p>
-<h3><a name="FOOT60" href="#DOCF60">(60)</a></h3>
+<h3><a name="FOOT65" href="#DOCF65">(65)</a></h3>
<p>as well as its equivalence to the <code>Rcomplex</code>
structure defined in <samp>R_ext/Complex.h</samp>.</p>
-<h3><a name="FOOT61" href="#DOCF61">(61)</a></h3>
+<h3><a name="FOOT66" href="#DOCF66">(66)</a></h3>
<p>at the time of revision of
this para in 2017, <strong>autoconf-2.69</strong> from 2012 and <strong>automake-1.15</strong>
from 2015.</p>
-<h3><a name="FOOT62" href="#DOCF62">(62)</a></h3>
+<h3><a name="FOOT67" href="#DOCF67">(67)</a></h3>
<p>The links
there have proved difficult to access, in which case either point an FTP
client at <a href="ftp://www.eecs.harvard.edu/pub/nr/">ftp://www.eecs.harvard.edu/pub/nr/</a> or grab the copy
made available at
<a href="http://developer.r-project.org/noweb-2.11b.tgz">http://developer.r-project.org/noweb-2.11b.tgz</a>.</p>
-<h3><a name="FOOT63" href="#DOCF63">(63)</a></h3>
+<h3><a name="FOOT68" href="#DOCF68">(68)</a></h3>
<p>for example, <code>X11 font at size 14 could not
be loaded</code>.</p>
-<h3><a name="FOOT64" href="#DOCF64">(64)</a></h3>
+<h3><a name="FOOT69" href="#DOCF69">(69)</a></h3>
<p>For example, <code>glibc</code>: other C libraries such as
<code>musl</code> have been used but are not routinely tested.</p>
-<h3><a name="FOOT65" href="#DOCF65">(65)</a></h3>
+<h3><a name="FOOT70" href="#DOCF70">(70)</a></h3>
<p>or <code>-mtune=corei7</code> for Intel Core
i3/15/17 with <code>gcc</code> &ge; 4.6.0.</p>
-<h3><a name="FOOT66" href="#DOCF66">(66)</a></h3>
-<p>This also needs the OpenMP runtime
-which has sometimes been distributed separately.</p>
-<h3><a name="FOOT67" href="#DOCF67">(67)</a></h3>
+<h3><a name="FOOT71" href="#DOCF71">(71)</a></h3>
+<p>This
+also needs the OpenMP runtime which has sometimes been distributed
+separately.</p>
+<h3><a name="FOOT72" href="#DOCF72">(72)</a></h3>
<p>It will be necessary to install later versions of
software such as <code>libcurl</code>.</p>
-<h3><a name="FOOT68" href="#DOCF68">(68)</a></h3>
+<h3><a name="FOOT73" href="#DOCF73">(73)</a></h3>
<p>Apple provides a partial emulation
of GNU readline 4.2 based on the NetBSD <code>editline</code> library. That
is not recommended but for the time being R&rsquo;s installation scripts
will make use of it if GNU readline is not found.</p>
-<h3><a name="FOOT69" href="#DOCF69">(69)</a></h3>
+<h3><a name="FOOT74" href="#DOCF74">(74)</a></h3>
<p>These days that is defined by Apple&rsquo;s implementation
of <code>clang</code>, so it is strongly recommended to use that.</p>
-<h3><a name="FOOT70" href="#DOCF70">(70)</a></h3>
+<h3><a name="FOOT75" href="#DOCF75">(75)</a></h3>
<p>Some of these are unsigned packages: to
install them you may need to right-click and select <code>Open with -&gt;
Installer</code>.</p>
-<h3><a name="FOOT71" href="#DOCF71">(71)</a></h3>
+<h3><a name="FOOT76" href="#DOCF76">(76)</a></h3>
+<p>It is unstated what the minimum OS requirement is
+for these: the distribution of 5.0.0 required Sierra or later.</p>
+<h3><a name="FOOT77" href="#DOCF77">(77)</a></h3>
+<p><a href="https://developer.apple.com/documentation/accelerate">https://developer.apple.com/documentation/accelerate</a>.</p>
+<h3><a name="FOOT78" href="#DOCF78">(78)</a></h3>
<p>It was reported that for some non-Apple
toolchains <code>CPPFLAGS</code> needed to contain <code>-D__ACCELERATE__</code>:
not needed for <code>clang</code> 4.0.0, though.</p>
-<h3><a name="FOOT72" href="#DOCF72">(72)</a></h3>
+<h3><a name="FOOT79" href="#DOCF79">(79)</a></h3>
<p>E.g. <em>via</em> <code>tlmgr install cm-super helvetic
inconsolata texinfo</code> .</p>
-<h3><a name="FOOT73" href="#DOCF73">(73)</a></h3>
+<h3><a name="FOOT80" href="#DOCF80">(80)</a></h3>
<p>For more
details see <a href="http://www.macstrategy.com/article.php?3">http://www.macstrategy.com/article.php?3</a>.</p>
-<h3><a name="FOOT74" href="#DOCF74">(74)</a></h3>
+<h3><a name="FOOT81" href="#DOCF81">(81)</a></h3>
<p>In the unlikely event that the version reported does
not start with <code>1.8.0</code> or <code>9</code> you need to update your Java.</p>
-<h3><a name="FOOT75" href="#DOCF75">(75)</a></h3>
+<h3><a name="FOOT82" href="#DOCF82">(82)</a></h3>
<p>Oracle Solaris Studio prior to 2016,
and previously Sun Studio.</p>
-<h3><a name="FOOT76" href="#DOCF76">(76)</a></h3>
+<h3><a name="FOOT83" href="#DOCF83">(83)</a></h3>
<p>using the <samp>-V</samp> flag.</p>
-<h3><a name="FOOT77" href="#DOCF77">(77)</a></h3>
+<h3><a name="FOOT84" href="#DOCF84">(84)</a></h3>
<p>When last checked it failed in <samp>tests/reg-BLAS.R</samp>,
and on some builds, including for &lsquo;<samp>amd64</samp>&rsquo;, it failed in
<code>example(eigen)</code>.</p>
-<h3><a name="FOOT78" href="#DOCF78">(78)</a></h3>
+<h3><a name="FOOT85" href="#DOCF85">(85)</a></h3>
<p>In particular, header
<samp>cmath</samp> in C++11 mode includes <samp>math.h</samp> and
<samp>iso/math_c99.h</samp> and <code>gcc</code> had &lsquo;fixed&rsquo; an earlier version
of the latter.</p>
-<h3><a name="FOOT79" href="#DOCF79">(79)</a></h3>
+<h3><a name="FOOT86" href="#DOCF86">(86)</a></h3>
<p>For
example, the Cygwin version of <code>make 3.81</code> fails to work
correctly.</p>
-<h3><a name="FOOT80" href="#DOCF80">(80)</a></h3>
+<h3><a name="FOOT87" href="#DOCF87">(87)</a></h3>
<p>such as <code>sort</code>, <code>find</code> and perhaps
<code>make</code>.</p>
</div>
diff --git a/doc/manual/R-admin.texi b/doc/manual/R-admin.texi
index 8b165d7..3c92921 100644
--- a/doc/manual/R-admin.texi
+++ b/doc/manual/R-admin.texi
@@ -931,9 +931,12 @@ involving times after 2037 or before 1916. An alternative time-zone
directory@footnote{How to prepare such a directory is described in file
@file{src/extra/tzone/Notes} in the @R{} sources.} can be used, pointed
to by environment variable @env{TZDIR}: this should contain files such
-as @file{Europe/London}. On all tested OSes the system timezone was
+as @file{Europe/London}. On most OSes the system timezone was
deduced correctly, but if necessary it can be set as the value of
-environment variable @env{TZ}.
+environment variable @env{TZ}. (OSes which do not follow the
+documentation of @file{/etc/localtime} as a symbolic link will have
+problems: this includes recent Debian-based Linuxen and RHEL/Centos 6
+(but not 7).)
@menu
@@ -946,9 +949,9 @@ environment variable @env{TZ}.
By default @command{configure} searches for suitable
options@footnote{for example, @option{-fopenmp}, @option{-xopenmp} or
-@option{-qopenmp}. This includes for @command{clang} 3.7.x and the
-Intel C compiler.} for OpenMP support for the C, C++98, FORTRAN 77 and
-Fortran compilers.
+@option{-qopenmp}. This includes for @command{clang} and the Intel C
+compiler.} for OpenMP support for the C, C++98, FORTRAN 77 and Fortran
+compilers.
Only the C result is currently used for @R{} itself, and only if
@code{MAIN_LD}/@code{DYLIB_LD} were not specified. This can be
@@ -970,11 +973,15 @@ SHLIB_OPENMP_FFLAGS
@noindent
Setting to an empty value will disable OpenMP for that compiler (and
-configuring with @option{--disable-openmp} will disable all detection of
-OpenMP). The @command{configure} detection test is to compile and link
-a standalone OpenMP program, which is not the same as compiling a shared
-object and loading it into the C program of @R{}'s executable. Note
-that overridden values are not tested.
+configuring with @option{--disable-openmp} will disable all
+detection@footnote{This does not necessarily disable @emph{use} of
+OpenMP -- the @command{configure} code allows for platforms where OpenMP
+is used without a flag. For the @command{flang} compiler in late 2017,
+the Fortran runtime always used OpenMP.} of OpenMP). The
+@command{configure} detection test is to compile and link a standalone
+OpenMP program, which is not the same as compiling a shared object and
+loading it into the C program of @R{}'s executable. Note that
+overridden values are not tested.
@node C++ Support, , OpenMP Support, Other Options
@subsection C++ Support
@@ -1871,7 +1878,7 @@ If you want to get rid of @R{} more completely using a Terminal, simply
run:
@example
-sudo rm -rf /Library/Frameworks/R.framework /Applications/R.app \
+sudo rm -Rf /Library/Frameworks/R.framework /Applications/R.app \
/usr/local/bin/R /usr/local/bin/Rscript
@end example
@@ -1916,8 +1923,8 @@ These are paths relative to @file{/}, the root of the file system.
@section Multiple versions
The installer will remove any previous version@footnote{More precisely,
-of the package of the same name: this means that installing a package for
-3.3.x does 3.4.x does not remove an installation of the other series.} of
+of the Apple package of the same name: this means that installing a package for
+3.3.x does not remove an installation for 3.4.x or later.} of
the @R{} framework which it finds installed. This can be avoided by
using @command{pkgutil --forget} (see the previous section). However,
note that different versions are installed under
@@ -3037,7 +3044,7 @@ is the current working directory (in the build directory tree on a
Unix-alike if that is separate from the sources).
@file{Rmath.h} contains @samp{R_VERSION_STRING}, which is a character
-string containing the current @R{} version, for example @code{"3.4.0"}.
+string containing the current @R{} version, for example @code{"3.4.4"}.
There is full access to @R{}'s handling of @code{NaN}, @code{Inf} and
@code{-Inf} via special versions of the macros and functions
@@ -3502,11 +3509,15 @@ the resulting build will not pass its checks.).
An implementation of @acronym{XDR} is required, and the @R{} sources
contain one which is likely to suffice (although a system version may
have higher performance). @acronym{XDR} is part of @acronym{RPC} and
-historically has been part of @file{libc} on a Unix-alike. However some
-builds of @code{glibc} hide it with the intention that the
-@acronym{TI-RPC} library be used instead, in which case @code{libtirpc}
-(and its development version) needs to be installed, and its headers
-need to be on the C include path or in @file{/usr/include/tirpc}.
+historically has been part of @file{libc} on a Unix-alike. (In
+principle @command{man xdr_string} should tell you which library is
+needed, but it often does not: on Solaris and others it is provided by
+@code{libnsl}.) However some builds@footnote{This is the default as
+from @code{glibc} 2.26 and has been announced for Fedora 28.} of
+@code{glibc} omit or hide it with the intention that the
+@acronym{TI-RPC} library be used, in which case @code{libtirpc} (and its
+development version) needs to be installed, and its headers need to be
+on the C include path or in @file{/usr/include/tirpc}.
Use of the X11 clipboard selection requires the @code{Xmu} headers and
libraries. These are normally part of an X11 installation (e.g.@: the
@@ -3712,13 +3723,16 @@ multi-threaded @acronym{BLAS}. Note that using a multi-threaded
more elapsed time (occasionally dramatically so) than using a similar
single-threaded @acronym{BLAS}. On a machine running other tasks, there
can be contention for CPU caches that reduces the effectiveness of the
-optimization of cache use by a @acronym{BLAS} implementation.
+optimization of cache use by a @acronym{BLAS} implementation: some
+people warn that this is especially problematic for hyperthreaded CPUs
Note that under Unix (but not under Windows) if @R{} is compiled against
a non-default @acronym{BLAS} and @option{--enable-BLAS-shlib} is
-@strong{not} used, then all @acronym{BLAS}-using packages must also be.
-So if @R{} is re-built to use an enhanced @acronym{BLAS} then packages
-such as @CRANpkg{quantreg} will need to be re-installed.
+@strong{not} used (it is the default on all platforms except AIX), then
+all @acronym{BLAS}-using packages must also be. So if @R{} is re-built
+to use an enhanced @acronym{BLAS} then packages such as
+@CRANpkg{quantreg} will need to be re-installed; they may be under other
+circumstances.
@R{} relies on @acronym{ISO}/@acronym{IEC}@tie{}60559 compliance of an
external @acronym{BLAS}. This can be broken if for example the code
@@ -3727,122 +3741,145 @@ be computed---whereas @code{x*0} can be @code{NaN}. This is checked in
the test suite.
External @acronym{BLAS} implementations often make less use of
-extended-precision floating-point registers and will almost certainly
-re-order computations. This can result in less accuracy than using the
-internal @acronym{BLAS}, and may result in different solutions, e.g.@:
-different signs in SVD and eigendecompositions.
-
-The URIs for several of these BLAS are subject to frequent gratuitous
-changes, so you will need to search for their current locations.
+extended-precision floating-point registers (where available) and will
+almost certainly re-order computations. This can result in less
+accuracy than using a reference @acronym{BLAS}, and may result in
+different solutions, e.g.@: different signs in SVD and
+eigendecompositions.
+
+Debian/Ubuntu systems provide a system-specific way to switch the BLAS
+in use. Build @R{} with @option{-with-blas} to select the OS version
+of the reference BLAS, and then use @command{update-alternatives} to
+switch between the available BLAS libraries. See
+@uref{https://wiki.debian.org/DebianScience/LinearAlgebraLibraries}.
+
+The URIs for several of these BLAS have been subject to frequent
+gratuitous changes, so you will need to search for their current
+locations.
@menu
* ATLAS::
-* ACML::
* Goto and OpenBLAS::
* MKL::
+* ACML::
* Shared BLAS::
@end menu
-@node ATLAS, ACML, BLAS, BLAS
+@node ATLAS, Goto and OpenBLAS, BLAS, BLAS
@subsubsection ATLAS
ATLAS (@uref{http://math-atlas.sourceforge.net/}) is a ``tuned''
@acronym{BLAS} that runs on a wide range of Unix-alike platforms.
Unfortunately it is built by default as a static library that on some
-platforms cannot be used with shared objects such as are used in @R{}
-packages. Be careful when using pre-built versions of ATLAS (they seem
-to work on @cputype{ix86} platforms, but not always on @cputype{x86_64}
-ones).
+platforms may not be able to be used with shared objects such as are
+used in @R{} packages. Be careful when using pre-built versions of
+ATLAS static libraries (they seem to work on @cputype{ix86} platforms,
+but not always on @cputype{x86_64} ones).
-The usual way to specify ATLAS will be via
+ATLAS contains replacements for a small number of LAPACK routines, but
+can be built to merge these with LAPACK sources to include a full LAPACK
+library.
+Recent versions of ATLAS can be built as a single shared library, either
+@code{libsatlas} or @code{libtatlas} (serial or threaded respectively):
+these may even contain a full LAPACK. Such builds can be used by one of
@example
---with-blas="-lf77blas -latlas"
+--with-blas=satlas
+--with-blas=tatlas
@end example
-
@noindent
-if the libraries are in the library path, otherwise by
-
+or, as on @cputype{x86_64} Fedora where a path needs to be specified,
@example
---with-blas="-L/path/to/ATLAS/libs -lf77blas -latlas"
+--with-blas="-L/usr/lib64/atlas -lsatlas"
+--with-blas="-L/usr/lib64/atlas -ltatlas"
@end example
-
@noindent
-For example, @cputype{x86_64} Fedora needs
-@example
---with-blas="-L/usr/lib64/atlas -lf77blas -latlas"
-@end example
+Distributed ATLAS libraries cannot be tuned to your machine and so are a
+compromise: for example Fedora tunes @cputype{x86_64} for CPUs with SSE3
+extensions, and separate @samp{atlas-sse2} and @samp{atlas-sse3}
+@cputype{i686} RPMs are available.@footnote{There were others for earlier
+versions of ATLAS, and are for non-Intel architectures. The only way to
+see exactly which CPUs the distributed libraries have been tuned for is
+to read the @file{atlas.spec} file: at the time of writing
+@samp{HAMMER64SSE3} and @samp{Corei264AVX} for @cputype{x86_64} Fedora.}
-For systems with multiple CPU cores it is possible to use a
-multi-threaded version of ATLAS, by specifying
+Note that building @R{} on Linux against distributed shared libraries
+may need @samp{-devel} or @samp{-dev} packages installed.
+Linking against multiple static libraries requires one of
@example
+--with-blas="-lf77blas -latlas"
--with-blas="-lptf77blas -lpthread -latlas"
+--with-blas="-L/path/to/ATLAS/libs -lf77blas -latlas"
+--with-blas="-L/path/to/ATLAS/libs -lptf77blas -lpthread -latlas"
@end example
-Consult its installation guide for how to build ATLAS with
-position-independent code, and as a shared library.
-
-@node ACML, Goto and OpenBLAS, ATLAS, BLAS
-@subsubsection ACML
-
-For @cputype{x86_64} processors@footnote{and @cputype{i686} for earlier
-versions.} under Linux there is the AMD Core Math Library (ACML).
-For the @command{gcc} version we could use
-
-@example
---with-blas="-lacml"
-@end example
-
-@noindent
-if the appropriate library directory (such as
-@enindex LD_LIBRARY_PATH
-@file{/opt/acml5.1.0/gfortran64/lib}) is in the @env{LD_LIBRARY_PATH}.
-For other compilers, see the ACML documentation. There is a
-multithreaded Linux version of ACML available for recent versions of
-@command{gfortran}. To make use of this you will need something like
-
-@example
---with-blas="-L/opt/acml5.1.0/gfortran64_mp/lib -lacml_mp"
-@end example
-
-@noindent
-(and you may need to arrange for the directory to be in @command{ld.so}
-cache).
+Consult its installation
+guide@footnote{@uref{http://math-atlas.sourceforge.net/atlas_install/}}
+for how to build ATLAS as a shared library or as a static library with
+position-independent code (on platforms where that matters).
-See @pxref{Shared BLAS} for an alternative (and in many ways preferable)
-way to use ACML.
+According to the ATLAS
+FAQ@footnote{@uref{http://math-atlas.sourceforge.net/faq.html#tnum}} the
+maximum number of threads used by multi-threaded ATLAS is set at compile
+time. Also, the author advises against using multi-threaded ATLAS on
+hyperthreaded CPUs without restricting affinities at compile-time to one
+virtual core per physical CPU. (For the Fedora libraries the
+compile-time flag specifies 4 threads.)
+@c http://math-atlas.sourceforge.net/atlas_install/node21.html
-The version last tested (5.1.0) failed the @file{reg-BLAS.R} test in its
-handling of @code{NA}s.
-@node Goto and OpenBLAS, MKL, ACML, BLAS
+@node Goto and OpenBLAS, MKL, ATLAS, BLAS
@subsubsection Goto and OpenBLAS
-Dr Kazushige Goto wrote a tuned @acronym{BLAS} for several processors and
-OSes, which was frozen in mid-2010. The final version is known as
+Dr Kazushige Goto wrote a tuned @acronym{BLAS} for several processors
+and OSes, which was frozen in mid-2010. The final version is known as
GotoBLAS2, and was re-released under a much less restrictive licence.
-Once it is built and installed, it can be used by configuring @R{} with
+OpenBLAS (@uref{http://www.openblas.net/}) is a descendant project with
+support for some later CPUs (e.g.@: Intel Sandy Bridge and Haswell).
+
+These can be used by configuring @R{} with something like
@example
--with-blas="-lgoto2"
+--with-blas="-lopenblas"
@end example
+@noindent
See @pxref{Shared BLAS} for an alternative (and in many ways preferable)
-way to use it.
-
-OpenBLAS (@uref{http://www.openblas.net/}) is a descendant
-project with support for some later CPUs (e.g.@: Intel Sandy Bridge).
-Once installed it can be used by something like
+way to use them.
+Some platforms provide multiple builds of OpenBLAS: for example Fedora 26
+has RPMs@footnote{(and more, e.g.@: for 64-bit ints and static versions).}
@example
---with-blas="-lopenblas"
+openblas
+openblas-threads
+openblas-openmp
@end example
-
@noindent
-or as a shared BLAS.
+providing shared
+libraries
+@example
+libopenblas.so
+libopenblasp.so
+libopenblaso.so
+@end example
+@noindent
+respectively, each of which can be used as a shared BLAS. For the
+second and third the number of threads is controlled by
+@env{OPENBLAS_NUM_THREADS} and @env{OMP_NUM_THREADS} (as usual for
+OpenMP) respectively. There is also a Fedora RPM @samp{openblas-Rblas}
+to replace @file{libRblas.so} in their distribution of @R{}.
+
+Note that building @R{} on Linux against distributed libraries may need
+@samp{-devel} or @samp{-dev} packages installed.
+
+@c https://wiki.debian.org/DebianScience/LinearAlgebraLibraries
+For @cputype{ix86} and @cputype{x86_64} most distributed libraries
+contain several alternatives for different CPU microarchitectures with
+the choice being made at run time.
-@node MKL, Shared BLAS, Goto and OpenBLAS, BLAS
+@node MKL, ACML, Goto and OpenBLAS, BLAS
@subsubsection Intel MKL
For Intel processors (and perhaps others) and some distributions of
Linux, there is Intel's Math Kernel Library. You are strongly
@@ -3853,17 +3890,17 @@ recommended. Or see
@uref{https://software.intel.com/@/en-us/@/articles/@/intel-mkl-link-line-advisor}.
There are also versions of MKL for macOS and Windows, but at the time
-these were tried they did not work with the standard compilers used for
+these were tried they did not work with the default compilers used for
@R{} on those platforms.
The MKL interface has changed several times and may change again: the
-following examples have been used with versions 10.3 to 11.3, for GCC
+following examples have been used with versions 10.3 to 2018.1, for GCC
compilers on @cputype{x86_64}.
-To a sequential version of MKL we used
+To use a sequential version of MKL we used
@example
-MKL_LIB_PATH=/path/to/intel_mkl/lib/intel64
+MKL_LIB_PATH=/path/to/intel_mkl/mkl/lib/intel64
export LD_LIBRARY_PATH=$MKL_LIB_PATH
MKL="-L$@{MKL_LIB_PATH@} -lmkl_gf_lp64 -lmkl_core -lmkl_sequential"
./configure --with-blas="$MKL" --with-lapack
@@ -3886,7 +3923,13 @@ MKL="-L$@{MKL_LIB_PATH@} -lmkl_gf_lp64 -lmkl_core \
The default number of threads will be chosen by the OpenMP software, but
can be controlled by setting @code{OMP_NUM_THREADS} or
@code{MKL_NUM_THREADS}, and in recent versions seems to default to a
-sensible value for sole use of the machine.
+sensible value for sole use of the machine. (Parallel MKL has not
+always passed @command{make check-all}, but did with MKL 2018.1.)
+
+@c Note though that as with all non-reference LAPACK/BLAS, using MKL trades
+@c numerical accuracy for speed. When tested in January 2018, 23 CRAN
+@c packages failed their checks with serial MKL and 43 with multi-threaded
+@c MKL.
@c https://stat.ethz.ch/pipermail/r-devel/2015-September/071717.html
It has been reported that
@@ -3898,7 +3941,14 @@ It has been reported that
@noindent
worked with the Intel 2015.3 compilers on Centos 6.
-@node Shared BLAS, , MKL, BLAS
+@node ACML, Shared BLAS, MKL, BLAS
+@subsubsection ACML
+
+The AMD Core Math Library (ACML) is now end-of-life, although downloads
+remained available when checked in January 2018.
+@c https://developer.amd.com/tools-and-sdks/archive/acml-downloads-resources/
+
+@node Shared BLAS, , ACML, BLAS
@subsubsection Shared BLAS
The @acronym{BLAS} library will be used for many of the add-on packages
@@ -3922,7 +3972,7 @@ This has both advantages and disadvantages.
@item
It saves space by having only a single copy of the @acronym{BLAS}
routines, which is helpful if there is an external static @acronym{BLAS}
-such as used to be standard for ATLAS.
+(as used to be standard for ATLAS).
@item
There may be performance disadvantages in using a shared @acronym{BLAS}.
@@ -3943,17 +3993,34 @@ changed in @file{@var{R_HOME}/etc/ldpaths}.
@end itemize
Another option to change the @acronym{BLAS} in use is to symlink a
-dynamic @acronym{BLAS} library (such as ACML or Goto's) to
+single dynamic @acronym{BLAS} library to
@file{@var{R_HOME}/lib/libRblas.so}. For example, just
@example
mv @var{R_HOME}/lib/libRblas.so @var{R_HOME}/lib/libRblas.so.keep
-ln -s /opt/acml5.1.0/gfortran64_mp/lib/libacml_mp.so @var{R_HOME}/lib/libRblas.so
+ln -s /usr/lib64/libopenblasp.so.0 @var{R_HOME}/lib/libRblas.so
+@end example
+
+@noindent
+on @cputype{x86_64} Fedora will change the @acronym{BLAS} used to
+multithreaded OpenBLAS. A similar link works for most versions of the
+Goto @acronym{BLAS}, OpenBLAS and ACML (provided the appropriate
+@file{lib} directory is in the run-time library path or @command{ld.so}
+cache). It can also be used for a single-library ATLAS, so on
+@cputype{x86_64} Fedora
+
+@example
+ln -s /usr/lib64/atlas/libsatlas.so.3 @var{R_HOME}/lib/libRblas.so
+ln -s /usr/lib64/atlas/libtatlas.so.3 @var{R_HOME}/lib/libRblas.so
@end example
-will change the @acronym{BLAS} in use to multithreaded ACML. A similar
-link works for some versions of Goto @acronym{BLAS}, OpenBLAS and MKL
-(provided the appropriate @file{lib} directory is in the run-time
-library path or @command{ld.so} cache).
+
+@noindent
+can be used with its distributed ATLAS libraries. (If you have the
+@samp{-devel} RPMS installed you can omit the @code{.0}/@code{.3}.)
+
+Note that rebuilding or symlinking @file{libRblas.so} will not suffice
+if the intention is to use a modified LAPACK contained in an external
+BLAS: the latter could even cause conflicts.
@node LAPACK, Caveats, BLAS, Linear algebra
@@ -3962,7 +4029,7 @@ library path or @command{ld.so} cache).
@cindex LAPACK library
Provision is made for using an external LAPACK library, principally to
cope with @acronym{BLAS} libraries which contain a copy of LAPACK (such
-as @code{sunperf} on Solaris, @code{Accelerate} on macOS and ACML and MKL
+as @code{sunperf} on Solaris, @code{Accelerate} on macOS and ATLAS and MKL
on @cputype{ix86}/@cputype{x86_64} Linux). At least LAPACK version 3.2
is required. This can only be done if @option{--with-blas} has been used.
@@ -3974,15 +4041,11 @@ the configuration option @option{--with-lapack}. The default for
@option{--with-lapack} is to check the @acronym{BLAS} library and then
look for an external library @samp{-llapack}. Sites searching for the
fastest possible linear algebra may want to build a LAPACK library using
-the ATLAS-optimized subset of LAPACK. To do so specify something like
-
-@example
---with-lapack="-L/path/to/ATLAS/libs -llapack -lcblas"
-@end example
+the ATLAS-optimized subset of LAPACK: this is simplest with a dynamic
+ATLAS library which contains a full LAPACK, when @option{--with-lapack}
+suffices.
-@noindent
-since the ATLAS subset of LAPACK depends on @code{libcblas}. A value
-for @option{--with-lapack} can be set @emph{via} the environment
+A value for @option{--with-lapack} can be set @emph{via} the environment
variable
@enindex LAPACK_LIBS
@env{LAPACK_LIBS}, but this will only be used if @option{--with-lapack}
@@ -4014,7 +4077,7 @@ where it is used unnecessarily will simply irritate the @R{} helpers.
Note too the comments about @acronym{ISO}/@acronym{IEC}@tie{}60559
compliance in the section of external @acronym{BLAS}: these apply
equally to an external LAPACK, and for example the Intel MKL
-documentation says
+documentation has said
@quotation
LAPACK routines assume that input matrices do not contain IEEE 754
special values such as INF or NaN values. Using these special values may
@@ -4022,8 +4085,8 @@ cause LAPACK to return unexpected results or become unstable.
@end quotation
We rely on limited support in LAPACK for matrices with @math{2^{31}} or
-more elements: it is quite possible that an external LAPACK will not
-have that support.
+more elements: it is possible that an external LAPACK will not have that
+support.
If you have a pure FORTRAN 77 compiler which cannot compile LAPACK it
may be possible to use CLAPACK from
@@ -4132,7 +4195,7 @@ by option @option{--with-system-valgrind-headers}: they will be used if
present (on Linux they may be in a separate package such as
@pkg{valgrind-devel}). Note though that there is no guarantee that the
code in @R{} will be compatible with very old@footnote{We believe that
-versions 3.4.0 to 3.10.1 are compatible.} or future @command{valgrind}
+versions 3.4.0 to 3.13.0 are compatible.} or future @command{valgrind}
headers.
If you need to re-configure @R{} with different options you may need to run
@@ -4714,7 +4777,7 @@ LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib"
@noindent
is appropriate since most (but not all) software installs its 64-bit
libraries in @file{/usr/local/lib64}. To build a 32-bit version of @R{}
-on @cputype{x86_64} with Fedora 24 we used
+on @cputype{x86_64} with Fedora 26 we used
@example
CC="gcc -m32"
@@ -4740,7 +4803,7 @@ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
The 32-bit system @code{libcurl} did not work with the system CA
certificates: this is worked around in @R{}'s test suite.
-64-bit versions of Linux are built with support for files > 2Gb, and
+64-bit versions on Linux are built with support for files > 2Gb, and
32-bit versions will be if possible unless @option{--disable-largefile}
is specified.
@@ -4764,6 +4827,22 @@ FFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2"
the additional flags being needed to resolve problems linking against
@file{libnmath.a} and when linking @R{} as a shared library.
+@c suggestion of https://gcc.gnu.org/wiki/FloatingPointMath
+The setting of the macro @samp{SAFE_FFLAGS} may need some help. It
+should not need additional flags on platforms other than @cputype{68000}
+(not likely to be encountered) and @cputype{ix86} (and not
+@cputype{x86_64}). When the FORTRAN compiler is GNU (@command{gfortran}
+or possibly @command{g77}) the flags
+@example
+-msse2 -mfpmath=sse
+@end example
+@noindent
+are added: earlier versions of @R{} added @option{-ffloat-store} and
+this might still be needed if a @cputype{ix86} CPU is encountered
+without SSE2 support. Note that it is a @emph{replacement} for
+@samp{FFLAGS}, so should include all the flags in that macro (except
+perhaps the optimization level).
+
@menu
* Clang::
* Intel compilers::
@@ -4788,9 +4867,40 @@ project (@url{http://libcxx.llvm.org/}, Fedora RPM @code{libcxx-devel})
has also been tested: for some @R{} packages only the variant using
@code{libcxxabi} was successful.
-Earlier builds of @command{clang} have no OpenMP support, those of
-versions 3.7.0 or later may.@footnote{This also needs the OpenMP runtime
-which has sometimes been distributed separately.}
+Recent versions have (optional when built) OpenMP support.@footnote{This
+also needs the OpenMP runtime which has sometimes been distributed
+separately.}
+
+There is a project called @command{flang}
+(@uref{https://github.com/@/flang-compiler/@/flang})) to develop a
+Fortran compiler similar to clang but based on the Portland Group's front
+end. This needs something like
+@example
+FC=/usr/local/flang/bin/flang
+F77=/usr/local/flang/bin/flang
+LDFLAGS="-L/usr/local/flang/lib -L/usr/local/lib64"
+@end example
+@noindent
+and in earlier versions of @R{} it may be necessary to set
+@example
+FCPICFLAGS=-fpic
+FPICFLAGS=-fpic
+@end example
+
+Note that @command{flang} accepts all the flags which @command{clang}
+does (the driver is a modified version of @command{clang}, and
+@command{flang} is a symbolic link to @command{clang}), but does not
+implement all of them for Fortran compilation: it also accepts most
+PGI-style flags such as @option{-mp} for OpenMP. It currently produces
+few diagnostics even with @option{-Wall -pedantic}.
+
+@command{flang}'s Fortran runtime is compiled against OpenMP and it
+seems this conflicts with using OpenMP in @R{}. So it may be necessary
+to disable the latter by configuring using @option{--without-openmp}.
+
+It is not clear what architectures @command{flang} intends to support:
+experiments were done on @cputype{x86_64}.
+
@node Intel compilers, , Clang, Linux
@subsection Intel compilers
@@ -4844,6 +4954,13 @@ FC=$F77
FCFLAGS=$F77FLAGS
@end example
+It is possible that 32-builds need to force the use of SSE2 instructions
+in @code{SAFE_FFLAGS}, e.g.@: by
+@example
+SAFE_FFLAGS=-axsse2
+@end example
+
+
@node macOS, Solaris, Linux, Platform notes
@section macOS
@cindex macOS
@@ -4943,13 +5060,14 @@ FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0
More recent and complete distributions of @command{clang} are often
available from @uref{http://llvm.org/releases/}: for example at the time
-of writing of 5.0.0 built for Sierra or later. In particular, these
-should include support for OpenMP. Another build of clang 4.0.0 is
-available at
-@uref{https://r.research.att.com/@/libs/@/clang-4.0.0-darwin15.6-Release.tar.gz}.
-Suppose one of these distributions is installed under
-@file{/usr/local/clang4}. Then @R{} could be configured by something
-like
+of writing@footnote{It is unstated what the minimum OS requirement is
+for these: the distribution of 5.0.0 required Sierra or later.} of 5.0.1
+and 6.0.0. In particular, these include support for OpenMP. Another
+build of clang 4.0.0 with OpenMP is available at
+@uref{https://r.research.att.com/@/libs/@/clang-4.0.0-darwin15.6-Release.tar.gz}
+and used for the @acronym{CRAN} binary distributions. Suppose one of
+these distributions is installed under @file{/usr/local/clang4}. Then
+@R{} could be configured by something like
@example
./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib \
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig \
@@ -4997,17 +5115,26 @@ or appending that variable to the @command{configure} command.
@cindex BLAS library
@cindex LAPACK library
-The @code{Accelerate} library can be used @emph{via} the configuration options
+The @code{Accelerate}
+library@footnote{@uref{https://developer.apple.com/@/documentation/@/accelerate}.}
+can be used @emph{via} the configuration options
@example
---with-blas="-framework Accelerate" --with-lapack
+--with-blas="-framework Accelerate"
@end example
@noindent
to provide potentially higher-performance versions of the @acronym{BLAS}
and LAPACK routines.@footnote{It was reported that for some non-Apple
toolchains @code{CPPFLAGS} needed to contain @code{-D__ACCELERATE__}:
-not needed for @command{clang} 4.0.0, though.}
+not needed for @command{clang} 4.0.0, though.} This also includes a
+full LAPACK which can be used @emph{via} @option{--with-lapack}:
+however, the version of LAPACK it contains is currently seriously old
+(@samp{3.2.1} in macOS 10.13.2).
+
+@c https://developer.apple.com/documentation/accelerate/veclib
+In recent versions of macOS, threading in Accelerate is controlled by
+`Grand Central Dispatch' and is said not to need user control.
Looking at the top of
@file{/Library/Frameworks/R.framework/Resources/etc/Makeconf}
@@ -5088,10 +5215,6 @@ with
--with-tk-config=/Library/Frameworks/Tk.framework/tkConfig.sh
@end example
-@noindent
-(for the versions bundled with macOS, use paths starting with
-@file{/System/Library}).
-
If you need to find out which distribution of Tk is in use at run time,
use
@example
@@ -5105,7 +5228,7 @@ tclvalue(.Tcl("tk windowingsystem")) # "x11" or "aqua"
The situation with Java support on macOS is messy.@footnote{For more
details see @uref{http://www.macstrategy.com/@/article.php?3}.} As from
@R{} 3.4.0 the @acronym{CRAN} distribution of @CRANpkg{rJava} requires
-Java 8 (aka 1.8).
+Java 8.
macOS no longer comes with an installed Java runtime (JRE), and a macOS
upgrade may remove one if already installed: it is intended to be
@@ -5113,12 +5236,14 @@ installed at first use. Check if a JRE is installed by running
@command{java -version} in a @command{Terminal} window: if Java is not
installed@footnote{In the unlikely event that the version reported does
not start with @code{1.8.0} or @code{9} you need to update your Java.}
-this should prompt you to install it. You can also install directly the
-latest Java from Oracle (currently from
-@uref{http://www.oracle.com/@/technetwork/@/java/@/javase/@/downloads/@/index.html}).
+this should prompt you to install it. You can also install directly a
+recent Java from Oracle (currently from
+@uref{http://www.oracle.com/@/technetwork/@/java/@/javase/@/downloads/@/index.html}:
+note that Java 9 has a limited lifetime and at the time of writing
+@CRANpkg{rJava} did not install with Java 10).
Binary distributions of @R{} are built against a specific version (e.g.@:
-1.8.0_121) of Oracle Java so @command{sudo R CMD javareconf} may be
+1.8.0_161) of Oracle Java so @command{sudo R CMD javareconf} may be
needed before using Java-using packages.
@c You may need to install what Apple calls `legacy Java'@footnote{e.g.@:
@@ -5141,7 +5266,7 @@ The build process tries to fathom out what JRE/JDK to use, but it may
need some help, e.g.@: by setting @env{JAVA_HOME}. An Oracle JDK can
be specified explicitly by something like
@example
-JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
+JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
JAVA_CPPFLAGS="-I/$@{JAVA_HOME@}/include -I/$@{JAVA_HOME@}/include/darwin"
JAVA_LD_LIBRARY_PATH="$@{JAVA_HOME@}/jre/lib/server"
JAVA_LIBS="-L/$@{JAVA_HOME@}/jre/lib/server -ljvm"
@@ -5182,7 +5307,7 @@ selected by the option
@end example
(This is intended to be used with an Apple toolchain: others may not
-support frameworks correctly but that from @code{llvm.org} does.)
+support frameworks correctly but those from @code{llvm.org} do.)
It is only needed if you want to build @R{} for use with the @Rapp{}
console, and implies @option{--enable-R-shlib} to build @R{} as a
diff --git a/doc/manual/R-defs.texi b/doc/manual/R-defs.texi
index d33243d..88bc217 100644
--- a/doc/manual/R-defs.texi
+++ b/doc/manual/R-defs.texi
@@ -44,7 +44,7 @@ $\t\$%
@c -- edit these here alone -- in order keep consistency
@macro Rcopyright{year}
-Copyright @copyright{} \year\--2016 R Core Team
+Copyright @copyright{} \year\--2018 R Core Team
@end macro
@macro permission{}
diff --git a/doc/manual/R-exts.texi b/doc/manual/R-exts.texi
index a77bfb3..3182bbf 100644
--- a/doc/manual/R-exts.texi
+++ b/doc/manual/R-exts.texi
@@ -369,7 +369,7 @@ BugReports: https://pkgname.bugtracker.url
@noindent
The format is that of a version of a `Debian Control File' (see the help
for @samp{read.dcf} and
-@uref{https://www.debian.org/@/doc/@/debian-policy/@/ch-controlfields.html}:
+@uref{https://www.debian.org/@/doc/@/debian-policy/@/index.html#document-ch-controlfields}:
@R{} does not require encoding in UTF-8 and does not support comments
starting with @samp{#}). Fields start with an @acronym{ASCII} name
immediately followed by a colon: the value starts after the colon and a
@@ -582,8 +582,10 @@ The @samp{VignetteBuilder} field names (in a comma-separated list)
packages that provide an engine for building vignettes. These may
include the current package, or ones listed in @samp{Depends},
@samp{Suggests} or @samp{Imports}. The @pkg{utils} package is always
-implicitly appended. See @ref{Non-Sweave vignettes} for
-details.
+implicitly appended. See @ref{Non-Sweave vignettes} for details. Note
+that if, for example, the vignette `engine' is @samp{knitr::rmarkdown}
+this field needs to declare both @CRANpkg{knitr} and
+@CRANpkg{rmarkdown}.
@c DESCRIPTION field Encoding
If the @file{DESCRIPTION} file is not entirely in @acronym{ASCII} it
@@ -652,7 +654,9 @@ codes.
@c DESCRIPTION field RdMacros
An @samp{RdMacros} field can be used to hold a comma-separated list of
packages from which the current package will import @file{Rd} macro
-definitions. These will be imported after the system macros, in the
+definitions. These package should also be listed in @samp{Imports},
+@samp{Suggests} or @samp{Depends}. The macros in these packages will be
+imported after the system macros, in the
order listed in the @samp{RdMacros} field, before any macro definitions
in the current package are loaded. Macro definitions in individual
@file{.Rd} files in the @file{man} directory are loaded last, and are
@@ -833,7 +837,14 @@ specification, nor on the package @pkg{base}: this is an @R{} package
and package @pkg{base} is always available.
A package or @samp{R} can appear more than once in the @samp{Depends}
-field, for example to give upper and lower bounds on acceptable versions.
+field, for example to give upper and lower bounds on acceptable
+versions.
+
+It is inadvisable to use a dependence on @R{} with patchlevel (the third
+digit) other than zero. Doing so with packages which others depend on
+will cause the other packages to become unusable under earlier versions
+in the series, and e.g.@: versions 3.x.1 are widely used throughout the
+Northern Hemisphere academic year.
Both @code{library} and the @R{} package checking facilities use this
field: hence it is an error to use improper syntax or misuse the
@@ -900,17 +911,19 @@ All packages that are needed@footnote{This includes all packages
directly called by @code{library} and @code{require} calls, as well as
data obtained @emph{via} @code{data(theirdata, package = "somepkg")}
calls: @command{R CMD check} will warn about all of these. But there
-are subtler uses which it will not detect: e.g.@: if package A uses
+are subtler uses which it may not detect: e.g.@: if package A uses
package B and makes use of functionality in package B which uses package
C which package B suggests or enhances, then package C needs to be in
the @samp{Suggests} list for package A. Nor will undeclared uses in
included files be reported, nor unconditional uses of packages listed
-under @samp{Enhances}.} to successfully run @code{R CMD check} on the
-package must be listed in one of @samp{Depends} or @samp{Suggests} or
-@samp{Imports}. Packages used to run examples or tests conditionally
-(e.g.@: @emph{via} @code{if(require(@var{pkgname}))}) should be listed
-in @samp{Suggests} or @samp{Enhances}. (This allows checkers to ensure
-that all the packages needed for a complete check are installed.)
+under @samp{Enhances}. @command{R CMD check --as-cran} will detect more
+of the subtler uses, especially for re-building of vignettes as from
+@R{} 3.5.0.} to successfully run @code{R CMD check} on the package must
+be listed in one of @samp{Depends} or @samp{Suggests} or @samp{Imports}.
+Packages used to run examples or tests conditionally (e.g.@: @emph{via}
+@code{if(require(@var{pkgname}))}) should be listed in @samp{Suggests}
+or @samp{Enhances}. (This allows checkers to ensure that all the
+packages needed for a complete check are installed.)
@end itemize
@noindent
@@ -1466,7 +1479,7 @@ strsplit(tclvalue('auto_path'), " ")[[1]]
@noindent
then download the sources from
-@uref{http://sourceforge.net/@/projects/@/tcllib/@/files/@/BWidget/} and
+@uref{https://sourceforge.net/@/projects/@/tcllib/@/files/@/BWidget/} and
at the command line run something like
@example
@@ -1503,7 +1516,7 @@ https://cran.r-project.org/package=@var{pkgname}
@noindent
and not a version starting
-@samp{http://cran.r-project.org/web/packages/@var{pkgname}}.
+@samp{https://cran.r-project.org/web/packages/@var{pkgname}}.
@node Configure and cleanup, Checking and building packages, Package structure, Creating R packages
@section Configure and cleanup
@@ -1518,16 +1531,20 @@ should only assume a POSIX-compliant @command{/bin/sh} -- see
In particular @command{bash} extensions must not be used, and not all
@R{} platforms have a @command{bash} command, let alone one at
@file{/bin/bash}. All known shells used with @R{} support the use of
-backticks, but not all support @samp{$(@var{cmd})}.}) shell script
-@file{configure} in your package which (if present) is executed by
-@code{R CMD INSTALL} before any other action is performed. This can be
-a script created by the Autoconf mechanism, but may also be a script
-written by yourself. Use this to detect if any nonstandard libraries
-are present such that corresponding code in the package can be disabled
-at install time rather than giving error messages when the package is
-compiled or used. To summarize, the full power of Autoconf is available
-for your extension package (including variable substitution, searching
-for libraries, etc.).
+backticks, but not all support @samp{$(@var{cmd})}. However, real-world
+shells are not fully POSIX-compliant and omissions and idiosyncrasies
+need to be worked around---which Autoconf will do for you. Arithmetic
+expansion is a known issue: see
+@uref{https://www.gnu.org/@/software/@/autoconf/@/manual/autoconf.html#Portable-Shell}
+for this and others.}) shell script @file{configure} in your package
+which (if present) is executed by @code{R CMD INSTALL} before any other
+action is performed. This can be a script created by the Autoconf
+mechanism, but may also be a script written by yourself. Use this to
+detect if any nonstandard libraries are present such that corresponding
+code in the package can be disabled at install time rather than giving
+error messages when the package is compiled or used. To summarize, the
+full power of Autoconf is available for your extension package
+(including variable substitution, searching for libraries, etc.).
Under a Unix-alike only, an executable (Bourne shell) script
@file{cleanup} is executed as the last thing by @code{R CMD INSTALL} if
@@ -2126,7 +2143,7 @@ default@footnote{Windows default, not MinGW-w64 default.} FPU control
word, so computations done on OpenMP threads will not make use of
extended-precision arithmetic which is the default for the main process.
@c mingw64-public, 2015-02-02.
-@c http://stackoverflow.com/questions/2553725/is-the-fpu-control-word-setting-per-thread-or-per-process
+@c https://stackoverflow.com/questions/2553725/is-the-fpu-control-word-setting-per-thread-or-per-process
Calling any of the @R{} API from threaded code is `for experts only':
they will need to read the source code to determine if it is
@@ -2480,9 +2497,9 @@ features which are not otherwise implemented in C++, and C++ compilers
commonly accept C99 extensions to C++98. A minor update@footnote{The
changes are linked from
@uref{https://isocpp.org/@/std/@/standing-documents/@/sd-6-sg10-feature-test-recommendations}.}
-to C++11 (C++14) was published in December 2014. The next standard
-(C++17) was approved in Sept 2017 and will be published by ISO in due
-course.
+to C++11 (C++14) was published in December 2014. The latest standard
+(C++17) was published in December 2017, and a further revision (`C++20')
+is in preparation.
What standard a C++ compiler aims to support can be hard to determine:
the value@footnote{Values @code{199711}, @code{201103L} and
@@ -2492,13 +2509,14 @@ may help but some compilers use it to denote a standard which is
partially supported and some the latest standard which is (almost) fully
supported. As from version 6, @command{g++} defaults to C++14 (with GNU
extensions): earlier versions aim to support C++03 with many extensions
-(including support for TR1). @command{clang} with its
+(including support for TR1) with version 5 having fairly complete C++14
+support enabled by flag @option{-std=gnu++14}. @command{clang} with its
native@footnote{Some distributions, notably Debian, have supplied a
build of @command{clang} with @command{g++}'s headers and library.
Conversely, Apple's command named @command{g++} is based on
-@command{clang} using @code{libc++}.} @code{libc++} headers and library
-includes most C++14 features, and does not support TR1. As from version
-6.0.0, @command{clang} is expected to default to C++14.
+@command{clang} using @code{libc++}.} @code{libc++} headers and library
+has since version 3.4 included almost all C++14 features, but does not
+support TR1. As from version 6.0.0, @command{clang} defaults to C++14.
Since version 3.1.0, @R{} has provided support for C++11 in packages in
addition to C++98. This support is not uniform across platforms as it
@@ -2648,8 +2666,8 @@ using std::make_unique;
@noindent
Code needing C++14 features would do better to test for their presence
-@emph{via} `SD-6 feature tests'@footnote{@uref{See
-https://isocpp.org/@/std/@/standing-documents/@/sd-6-sg10-feature-test-recommendations}
+@emph{via} `SD-6 feature tests'@footnote{See
+@uref{https://isocpp.org/@/std/@/standing-documents/@/sd-6-sg10-feature-test-recommendations}
or
@uref{http://en.cppreference.com/@/w/@/cpp/@/experimental/@/feature_test}.
It seems a reasonable assumption that any compiler promising some C++14
@@ -2668,19 +2686,18 @@ using std::make_unique;
The webpage
@uref{http://en.cppreference.com/@/w/@/cpp/@/compiler_support} gives
some information on which compilers are known to support recent C++
-features, including those in the C++17 drafts (for which feature tests
-should be used).
+features.
@node Using C++17 code, , Using C++14 code, Configure and cleanup
@subsection Using C++17 code
Experimental support for C++17 has been added to @R{} version 3.4.0. The
-@file{configure} script tests a subset of C++17 features. At the time
-of writing (March 2017) both @code{clang 4.0.0} and @code{gcc 7.1} pass
-these tests (with flags @option{-std=gnu++1z} and @option{-std=gnu++17}
-respectively chosen by the @file{configure} script). Note that the
-C++17 feature tests are incomplete and are subject to change in future
-@R{} versions as compiler support for the standard improves.
+@file{configure} script tests a subset of C++17 features. @code{clang
+4.0.0} and @code{gcc 7.1} and later versions passed these tests (with
+flag @option{-std=gnu++17} or @option{-std=gnu++1z} chosen by the
+@file{configure} script). Note that the C++17 feature tests are
+incomplete and are subject to change in future @R{} versions as compiler
+support for the standard improves.
The variables associated with the C++17 compiler use the prefix
@samp{CXX17}. Hence to use C++17 code in a package, the package's
@@ -2699,6 +2716,9 @@ SystemRequirements: C++17
in the @file{DESCRIPTION} file. Finally, the C++17 compiler can be
used systematically by setting the environment variable @env{USE_CXX17}.
+As for C++14, feature tests can be used (and probably should be as
+compiler support is still patchy).
+
@node Checking and building packages, Writing package vignettes, Configure and cleanup, Creating R packages
@section Checking and building packages
@@ -3067,8 +3087,11 @@ installed on all platforms with suitable tools and is the usual form for
Unix-like systems; the binary form is platform-specific, and is the more
common distribution form for the Windows and macOS platforms.
-Using @command{R CMD build}, the @R{} package builder, one can build @R{}
-package tarballs from their sources (for example, for subsequent release).
+Using @command{R CMD build}, the @R{} package builder, one can build
+@R{} package tarballs from their sources (for example, for subsequent
+release). It is recommended that packages are built for release by the
+current release version of @R{} or @samp{r-patched}, to avoid
+inadvertently picking up new features of a development version of @R{}.
Prior to actually building the package in the standard gzipped tar file
format, a few diagnostic checks and cleanups are performed. In
@@ -4197,14 +4220,16 @@ line of the file) and not make use of GNU extensions. (The POSIX
specification is available at
@uref{http://pubs.opengroup.org/@/onlinepubs/@/9699919799/@/utilities/@/make.html};
anything not documented there should be regarded as an extension to be
-avoided.) Commonly misused GNU extensions are conditional inclusions
-(@code{ifeq} and the like), @code{$@{shell ...@}}, @code{$@{wildcard
-...@}} and similar, and the use of @code{+=}@footnote{This was
-apparently introduced in SunOS 4, and is available elsewhere
-@emph{provided} it is surrounded by spaces.} and @code{:=}. Also, the
-use of @code{$<} other than in implicit rules is a GNU extension, as is
-the @code{$^} macro. Unfortunately makefiles which use GNU extensions
-often run on other platforms but do not have the intended results.
+avoided. Further advice can be found at
+@uref{https://www.gnu.org/@/software/@/autoconf/@/manual/@/autoconf.html#Portable-Make}. )
+Commonly misused GNU extensions are conditional inclusions (@code{ifeq}
+and the like), @code{$@{shell ...@}}, @code{$@{wildcard ...@}} and
+similar, and the use of @code{+=}@footnote{This was apparently
+introduced in SunOS 4, and is available elsewhere @emph{provided} it is
+surrounded by spaces.} and @code{:=}. Also, the use of @code{$<} other
+than in implicit rules is a GNU extension, as is the @code{$^} macro.
+Unfortunately makefiles which use GNU extensions often run on other
+platforms but do not have the intended results.
The use of @code{$@{shell ...@}} can be avoided by using backticks, e.g.@:
@@ -4308,7 +4333,12 @@ C99 for C code. One common area of problems is the @code{*printf}
functions where Windows does not support @code{%lld}, @code{%Lf} and
similar formats (and has its own formats such as @code{%I64d} for 64-bit
integers). It is very rare to need to output such types, and 64-bit
-integers can usually be converted to doubles for output.
+integers can usually be converted to doubles for output. However, the
+C11 standard (§7.8.1) includes @code{PRIxNN} macros@footnote{These are
+optional because the corresponding types are, but must be provided if the
+types are.} in C header @file{inttypes.h} (for example @code{PRId64}) so
+the portable approach is to test for these and if not available provide
+emulations in the package.
@item
@command{R CMD check} performs some checks for non-portable
@@ -4329,6 +4359,18 @@ although @option{-pthread} is pretty close to portable. (Option
only cancel built-in defines (not portable) and those defined earlier on
the command line (@R{} does not use any).)
+People have used @command{configure} to customize @file{src/Makevars},
+including for specific compilers. This is unsafe for several reasons.
+First, unintended compilers might meet the check---for example, several
+compilers other than GCC identify themselves as `GCC' whilst being only
+partially conformant. Second, future versions of compilers may behave
+differently (including updates to quite old series) so for example
+@option{-Werror} (and specializations) can make a package
+non-installable under a future version. Third, using flags to suppress
+diagnostic messages can hide important information for debugging on a
+platform not tested by the package maintainer. (@command{R CMD check}
+can optionally report on unsafe flags which were used.)
+
@item
Do be very careful with passing arguments between @R{}, C and
@acronym{FORTRAN} code. In particular, @code{long} in C will be 32-bit
@@ -4527,8 +4569,19 @@ Make sure that any version requirement for Java code is both declared in
the @samp{SystemRequirements} field and tested at runtime (not least as
the Java installation when the package is installed might not be the
same as when the package is run and will not be for binary packages).
-Java 8 (aka 1.8) is available for fewer platforms than Java 7. A
-suitable test for packages using @CRANpkg{rJava} would be
+Java 8 is available for fewer platforms than Java 7, and Java 9 for
+fewer still (at the time of writing, only @cputype{x86_64} Linux, macOS,
+64-bit Windows and 64-bit Sparc Solaris from Oracle).
+
+When specifying a minimum Java version please use the official version
+names, which are (confusingly)
+@example
+1.1 1.2 1.3 1.4 5.0 6 7 8 9
+@end example
+@noindent
+and supposedly will in 2018 move to a year.month scheme such as @samp{18.3}.
+
+A suitable test for packages using @CRANpkg{rJava} would be something like
@example
.jinit()
jv <- .jcall("java/lang/System", "S", "getProperty", "java.runtime.version")
@@ -4540,6 +4593,24 @@ if(substr(jv, 1L, 1L) == "1") @{
@noindent
(Java 9 changed the format of this string.)
+Note too that the compiler used to produce a @code{jar} can impose a minimum
+Java version, often resulting in an arcane message like
+
+@example
+java.lang.UnsupportedClassVersionError: ... Unsupported major.minor version 52.0
+@end example
+@noindent
+(Where @uref{https://en.wikipedia.org/@/wiki/@/Java_class_file} maps
+class-file version numbers to Java versions.) Compile with something
+like @command{javac -target 1.6} to ensure this is avoided. (As from
+Java 8, @command{javac} defaults to compiling for Java 8.) Note this
+also applies to packages distributing compiled Java code (such as
+@pkg{jgraph}) produced by others, so their requirements need to be
+checked (they are often not documented accurately) and accounted for.
+The class-file version can in principle be checked @emph{via}
+command-line utility @command{javap}, if necessary after extracting the
+@file{.class} files from a @file{.jar} archive.
+
Some packages have stated a requirement on a particular JDK, but a
package should only be requiring a JRE unless providing its own Java
interface.
@@ -4551,15 +4622,20 @@ portable, annoyingly so if this is not declared in the
@command{pandoc}, which is only available for a very limited range of
platforms (and has onerous requirements to install from source) and has
capabilities@footnote{For example, the ability to handle @samp{https://}
-URLs, which even the build in some major Linux distributions in 2017 did
-not possess.} that vary by build but are not documented.
-
-An external command can be an optional requirement for an imported
-package but needed for examples or tests in the package itself. Such
-usage should always be conditional on a test for existence (perhaps
-using @code{Sys.which}), as well as declared in the
+URLs, which even the build in some major Linux distributions in 2018 did
+not possess. Further, Linux and macOS builds from late 2017 with
+@samp{https://} support were unable to download from some sites using or
+redirecting to @samp{https://} URLs.} that vary by build but are not
+documented.
+
+Usage of external commands should always be conditional on a test for
+existence (perhaps using @code{Sys.which}), as well as declared in the
@samp{SystemRequirements} field.
+An external command can be a (possibly optional) requirement for an
+imported or suggested package but needed for examples or tests in the
+package itself. Such usages should always be declared and conditional.
+
@item
Be sure to use portable encoding names: none of @code{utf8}, @code{mac}
and @code{macroman} are. See the help for @code{file} for more details.
@@ -4576,6 +4652,31 @@ manual, use something like
@end example
with appropriate quotes (as, although not recommended, @env{R_HOME} can
contain spaces).
+
+@item
+Do not use @env{R_HOME} in makefiles except when passing them to the shell.
+Specifically, do not use @env{R_HOME} in the argument to @code{include},
+as @env{R_HOME} can contain spaces. Quoting the argument to @code{include}
+does not help. GNU @command{make}'s @code{include} accepts spaces when
+escaped using backslashes (GNU @command{make} syntax required):
+
+@example
+## WARNING: requires GNU make (allowed on Windows)
+sp =
+sp +=
+sq = $(subst $(sp),\ ,$1)
+include $(call sq,$@{R_HOME@}/etc$@{R_ARCH@}/Makeconf)
+@end example
+
+A portable and the recommended way to avoid the problem of spaces in
+@code{$@{R_HOME@}} is using option @code{-f} of @command{make}. This is
+easy to do with recursive invocation of @command{make}, which is also the
+only usual situation when @env{R_HOME} is needed in the argument for
+@code{include}.
+
+@example
+$(MAKE) -f"$@{R_HOME@}/etc$@{R_ARCH@}/Makeconf" -fMakefile.inner
+@end example
@end itemize
@@ -4613,7 +4714,7 @@ tests on your platform achieve a particular tolerance says little about
other platforms. @R{} is configured by default to make use of long
doubles where available, but they may not be available or be too slow
for routine use. Most @R{} platforms use @cputype{ix86} or
-@cputype{x86_64} CPUs: these use extended precision registers on some
+@cputype{x86_64} CPUs: these may use extended precision registers on some
but not all of their FPU instructions. Thus the achieved precision can
depend on the compiler version and optimization flags---our experience
is that 32-bit builds tend to be less precise than 64-bit ones. But not
@@ -4794,7 +4895,7 @@ so it is strongly recommended to check in a UTF-8 locale.
@subsection Portable C and C++ code
Writing portable C and C++ code is mainly a matter of observing the
-standards (C99, C++98 or where declared C++11/14) and testing that
+standards (C99, C++98 or where declared C++11/14/17) and testing that
extensions (such as POSIX functions) are supported.
Note that the `TR1' C++ extensions are not part of any of these
@@ -4813,9 +4914,11 @@ used. On macOS extensions are declared unless one of these macros is
given too small a value.} they are not declared otherwise. So you may
need to include something like one of @footnote{Solaris 10 does not
recognize this value of @code{_POSIX_C_SOURCE}, nor values of
-@code{_XOPEN_SOURCE} beyond 600.}
+@code{_XOPEN_SOURCE} beyond 600 (700 corresponds to POSIX 2008).
+Further, the value of 500 is not allowed in C99 mode, @R{}'s default for
+C code.}
@example
-#define _XOPEN_SOURCE 500
+#define _XOPEN_SOURCE 600
@end example
@noindent
or
@@ -4948,12 +5051,6 @@ Variable-length arrays are C99, not supported by C++98 nor by the C++
compilers in use with @R{} on some platforms.
@item
-The @code{restrict} qualifier is C99/C11 but not part of C++11 and not
-supported by some C++ compilers used with @R{}.
-@c but package treatSens attempted to use it.
-@c http://stackoverflow.com/questions/6434549/does-c11-add-the-c99-restrict-specifier-if-not-why-not
-
-@item
Be careful to include the headers which define the functions you use.
Some compilers/OSes include other system headers in their headers which
are not required by the standards, and so code may compile on such
@@ -5048,7 +5145,7 @@ OpenMP in C/C++ code will need to use
#endif
@end example
@noindent
-Any use of OpenMP functions, e.g.@: @code{omp_set_num_threads} also
+Any use of OpenMP functions, e.g.@: @code{omp_set_num_threads}, also
needs to be conditioned.
And do not hardcode @option{-lgomp}: not only is that specific to the
@@ -5111,6 +5208,41 @@ POSIX function. An adequately portable preamble is
#endif
@end example
+@item
+Compiler writers feel free to implement features from later standards
+than the one specified (if any), so for example they may implement or
+warn on C++11, C++14 or even C++17 features. Portable code will not use
+such features -- it can be hard to know what they are but the most
+common warnings are
+@example
+'register' storage class specifier is deprecated and incompatible with C++17
+
+ISO C++11 does not allow conversion from string literal to 'char *'
+@end example
+@noindent
+(where conversion should be to @code{const char *}). Keyword
+@code{register} was not mentioned in C++98, deprecated in C++11 and
+removed in C++17.
+
+@item
+Be careful about including C headers in C++ code. Issues include
+@itemize
+@item
+Use of the @code{register} storage class specifier (see the previous
+item).
+@item
+The C99 keyword @code{restrict} is not part of@footnote{it is allowed
+but ignored in system headers.} any C++ standard and is rejected by some
+C++ compilers.
+@c but package treatSens attempted to use it.
+@c http://stackoverflow.com/questions/6434549/does-c11-add-the-c99-restrict-specifier-if-not-why-not
+@item
+Inclusion by such headers of C-style headers such as @file{math.h} (see above).
+@end itemize
+@noindent
+The most portable way to interface to other software with a C API is to
+use C code (which can normally be mixed with C++ code in a package).
+
@end itemize
Some additional information for C++ is available at
@@ -7674,7 +7806,7 @@ Developers have recommended @command{sample} (or @command{Sampler.app},
which is a GUI version), @command{Shark} (in version of @code{Xcode}
up to those for Snow Leopard), and @command{Instruments} (part of
@code{Xcode}, see
-@uref{https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html}).
+@uref{https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/index.html}).
@node Debugging, System and foreign language interfaces, Tidying and profiling R code, Top
@@ -8198,11 +8330,10 @@ mechanism can be helpful in isolating memory protect problems.
@subsection Using valgrind
If you have access to Linux on a common CPU type or supported versions
-of macOS@footnote{at the time of writing mainly for 10.9 with some
-support for 10.8, none for the current 10.10.} you can use
-@code{valgrind} (@uref{http://www.valgrind.org/}, pronounced to rhyme
-with `tinned') to check for possible problems. To run some examples
-under @code{valgrind} use something like
+of macOS or Solaris you can use @code{valgrind}
+(@uref{http://www.valgrind.org/}, pronounced to rhyme with `tinned') to
+check for possible problems. To run some examples under @code{valgrind}
+use something like
@example
R -d valgrind --vanilla < mypkg-Ex.R
@@ -8323,8 +8454,8 @@ Xcode 7 and later), with some support for Solaris. On some platforms
the runtime library, @pkg{libasan}, needs to be installed separately,
and for checking C++ you may also need @pkg{libubsan}.} of @command{gcc}
and @command{clang} on common Linux and macOS platforms. See
-@uref{http://clang.llvm.org/@/docs/@/UsersManual.html#controlling-code-generation},
-@uref{http://clang.llvm.org/@/docs/@/AddressSanitizer.html} and
+@uref{https://clang.llvm.org/@/docs/@/UsersManual.html#controlling-code-generation},
+@uref{https://clang.llvm.org/@/docs/@/AddressSanitizer.html} and
@uref{https://code.google.com/@/p/@/address-sanitizer/}.
More thorough checks of C++ code are done if the C++ library has been
@@ -8396,7 +8527,8 @@ MAIN_LDFLAGS = -fsanitize=address
@noindent
to link the runtime libraries into the @R{} executable if it was not
-specified as part of @samp{CC} when @R{} was built.
+specified as part of @samp{CC} when @R{} was built. (For some builds
+without OpenMP, @option{-pthread} is also required.)
For options available @emph{via} the environment variable
@env{ASAN_OPTIONS} see
@@ -8495,7 +8627,7 @@ This sanitizer can be combined with the Address Sanitizer by
Finer control of what is checked can be achieved by other options: for
@command{clang} see
-@uref{http://clang.llvm.org/@/docs/@/UsersManual.html#controlling-code-generation}.@footnote{or
+@uref{https://clang.llvm.org/@/docs/@/UsersManual.html#controlling-code-generation}.@footnote{or
the user manual for your version of @command{clang}, e.g.@: (the paths
have differed for some versions)
@uref{http://llvm.org/@/releases/@/4.0.0/@/tools/@/clang/@/docs/@/UsersManual.html}.}
@@ -8595,13 +8727,13 @@ It may or may not be possible to build @R{} itself with
Recent versions of @command{clang} on @cputype{x86_64} Linux have
`ThreadSanitizer' (@uref{https://code.google.com/@/p/@/thread-sanitizer/}),
a `data race detector for C/C++ programs', and `MemorySanitizer'
-(@uref{http://clang.llvm.org/@/docs/@/MemorySanitizer.html},
+(@uref{https://clang.llvm.org/@/docs/@/MemorySanitizer.html},
@uref{https://code.google.com/@/p/@/memory-sanitizer/@/wiki/@/MemorySanitizer})
for the detection of uninitialized memory. Both are based on and
provide similar functionality to tools in @command{valgrind}.
@command{clang} has a `Static Analyser' which can be run on the source
-files during compilation: see @uref{http://clang-analyzer.llvm.org/}.
+files during compilation: see @uref{https://clang-analyzer.llvm.org/}.
@node Using `Dr. Memory', Fortran array bounds checking, Other analyses with `clang', Checking memory access
@subsection Using `Dr. Memory'
@@ -9462,7 +9594,7 @@ September 2001, pages 20--23,
@uref{https://www.r-project.org/@/doc/@/Rnews/Rnews_2001-3.pdf}).
Once routines are registered, they can be referred to as @R{} objects if
-they this is arranged in the @code{useDynLib} call in the package's
+this is arranged in the @code{useDynLib} call in the package's
@file{NAMESPACE} file (see @ref{useDynLib}). So for example the
@pkg{stats} package has
@example
@@ -9549,7 +9681,7 @@ can make a large difference. The results can depend quite markedly on
the OS (and even if it is 32- or 64-bit), on the version of @R{} and
what else is loaded into @R{} at the time.
-To fix ideas, first consider @code{x84_64} OS 10.7 and @R{} 2.15.2. A
+To fix ideas, first consider @code{x86_64} OS 10.7 and @R{} 2.15.2. A
simple @code{.Call} function might be
@example
foo <- function(x) .Call("foo", x)
@@ -9729,7 +9861,7 @@ and @code{.Fortran} are all pointers, specifying them as @code{void *}
suffices. (For most platforms one can omit all the arguments.)
@item
-(Optional but highly recommended.) Restrict @code{.Call} etc to using the
+(Optional but highly recommended.) Restrict @code{.Call} etc to use the
symbols you chose to register by editing @file{src/init.c} to contain
@example
@@ -9782,7 +9914,7 @@ Check that there is no @code{exportPattern} directive which
unintentionally exports the newly created @R{} objects.
@item
-Restrict @code{.Call} to using the @R{} symbols by editing
+Restrict @code{.Call} to use the @R{} symbols by editing
@file{src/init.c} to contain
@example
@@ -9814,7 +9946,7 @@ nm -g /path/to/splines.so | grep " T "
@noindent
If there were any entry points not intended to be used by the package we
should try to avoid exporting them, for example by making them
-@code{static}. Now the two relevant entry points are only accessed
+@code{static}. Now that the two relevant entry points are only accessed
@emph{via} the registration table, we can hide them. There are two ways
to do so on some Unix-alikes. We can hide individual entry points
@emph{via}
@@ -9932,8 +10064,8 @@ routines.
A package that wishes to make use of header files in other packages
needs to declare them as a comma-separated list in the field
@samp{LinkingTo} in the @file{DESCRIPTION} file. This then arranges
-that the @file{include} directories in the installed linked-to packages
-are added to the include paths for C and C++ code.
+for the @file{include} directories in the installed linked-to packages
+to be added to the include paths for C and C++ code.
It must specify@footnote{whether or not @samp{LinkingTo} is used.}
@samp{Imports} or @samp{Depends} of those packages, for they have to be
@@ -9944,7 +10076,7 @@ loaded@footnote{so there needs to be a corresponding @code{import} or
@acronym{CRAN} examples of the use of this mechanism include @CRANpkg{coxme}
linking to @CRANpkg{bdsmatrix} and @CRANpkg{xts} linking to
-@CRANpkg{zoo}
+@CRANpkg{zoo}.
@node Creating shared objects, Interfacing C++ code, Registering native routines, System and foreign language interfaces
@section Creating shared objects
@@ -9988,7 +10120,7 @@ It is possible to arrange to include compiled code from other languages
by setting the macro @samp{OBJECTS} in file @file{Makevars}, together
with suitable rules to make the objects.
-Flags which are already set (for example in file
+Flags that are already set (for example in file
@file{etc@var{R_ARCH}/Makeconf}) can be overridden by the environment
variable @env{MAKEFLAGS} (at least for systems using a POSIX-compliant
@code{make}), as in (Bourne shell syntax)
@@ -10240,10 +10372,30 @@ system and so the two interworked successfully. This was true of
@command{g77}, but it is less true of @command{gfortran} as used in
@command{gcc} 4 and later. In particular, any package that makes use of
Fortran I/O will when compiled on Windows interfere with C I/O: when the
-Fortran I/O is initialized (typically when the package is loaded) the C
-@code{stdout} and @code{stderr} are switched to LF line endings.
-(Function @code{init} in file @file{src/modules/lapack/init_win.c} shows
-how to mitigate this.)
+Fortran I/O support code is initialized (typically when the package is
+loaded) the C @code{stdout} and @code{stderr} are switched to LF line
+endings. (Function @code{init} in file
+@file{src/modules/lapack/init_win.c} shows how to mitigate this. In a
+package this would look something like
+@example
+#ifdef _WIN32
+# include <fcntl.h>
+#endif
+
+void R_init_mypkgname(DllInfo *dll)
+@{
+ // Native symbol registration calls
+
+#ifdef _WIN32
+ // gfortran I/O initialization sets these to _O_BINARY
+ setmode(1, _O_TEXT); /* stdout */
+ setmode(2, _O_TEXT); /* stderr */
+#endif
+@}
+@end example
+@noindent
+in the file used for native symbol registration.)
+
@node Linking to other packages, Handling R objects in C, Fortran I/O, System and foreign language interfaces
@section Linking to other packages
@@ -12153,8 +12305,7 @@ void R_RunWeakRefFinalizer(SEXP w);
@end example
A toy example of the use of weak references can be found at
-@uref{http://homepage.stat.uiowa.edu/~luke/R/references/weakfinex.html,
-@code{homepage.@/stat.@/uiowa.@/edu/@/~luke/@/R/references/@/weakfinex.html}},
+@uref{https://homepage.stat.uiowa.edu/~luke/R/references/weakfinex.html},
but that is used to add finalizers to external pointers which can now be
done more directly. At the time of writing no @acronym{CRAN} or
Bioconductor package uses weak references.
@@ -14294,6 +14445,7 @@ compile the front-end. Suppose file @file{myfe.c} is to be compiled to
@file{myfe}. A suitable @file{Makefile} might be
@example
+## WARNING: does not work when $@{R_HOME@} contains spaces
include $@{R_HOME@}/etc$@{R_ARCH@}/Makeconf
all: myfe
@@ -14314,6 +14466,17 @@ R CMD make
R CMD myfe
@end example
+Even though not recommended, @code{$@{R_HOME@}} may contain spaces. In that
+case, it cannot be passed as an argument to @code{include} in the makefile.
+Instead, one can instruct @command{make} using the @code{-f} option to
+include @file{Makeconf}, for example via recursive invocation of
+@command{make}, see @ref{Writing portable packages}.
+
+@example
+all:
+ $(MAKE) -f"$@{R_HOME@}/etc$@{R_ARCH@}/Makeconf" -fMakefile.inner
+@end example
+
Additional flags which @code{$(MAIN_LINK)} includes are, amongst others,
those to select OpenMP and @option{--export-dynamic} for the GNU linker
on some platforms. In principle @code{$(LIBS)} is not needed
diff --git a/doc/manual/R-intro.texi b/doc/manual/R-intro.texi
index 8695861..49e5dcd 100644
--- a/doc/manual/R-intro.texi
+++ b/doc/manual/R-intro.texi
@@ -532,7 +532,7 @@ strings, functions, or more general structures built from such
components.
During an @R{} session, objects are created and stored by name (we
-discuss this process in the next session). The @R{} command
+discuss this process in the next section). The @R{} command
@example
> objects()
diff --git a/doc/manual/R-ints.texi b/doc/manual/R-ints.texi
index 262a369..6ae20e9 100644
--- a/doc/manual/R-ints.texi
+++ b/doc/manual/R-ints.texi
@@ -3969,9 +3969,10 @@ is available to those who first install recording to a log, then call
@item _R_CHECK_DEPENDS_ONLY_
@itemx _R_CHECK_SUGGESTS_ONLY_
-If set to a true value, running examples, tests and vignettes is done
-with @code{.libPaths()} containing just a temporary library directory
-and @code{.Library}. The temporary library is populated by symbolic
+If set to a true value, running examples, tests and
+vignettes@footnote{but not re-building vignettes.} is done with
+@code{.libPaths()} containing just a temporary library directory and
+@code{.Library}. The temporary library is populated by symbolic
links@footnote{see the previous footnote.} to the installed copies of
all the Depends/Imports and (for the second only) Suggests packages
which are not in @code{.Library}. (As an exception, packages in a
diff --git a/m4/R.m4 b/m4/R.m4
index 6c60c60..3fe8b27 100644
--- a/m4/R.m4
+++ b/m4/R.m4
@@ -1978,7 +1978,7 @@ fi])
## R_BITMAPS
## ---------
-## This is the version used without png-config
+## This is the version used without pkg-config
## Here we only need any old -lz, and don't need zlib.h.
## However, we do need recent enough libpng and jpeg, and so check both
## the header versions and for key routines in the library.
@@ -2047,17 +2047,17 @@ AC_SUBST(BITMAP_LIBS)
## R_BITMAPS2
## ---------
-## This is the version used with png-config
+## This is the version used with pkg-config
AC_DEFUN([R_BITMAPS2],
[BITMAP_CPPFLAGS=
BITMAP_LIBS=
if test "${use_jpeglib}" = yes; then
save_CPPFLAGS=${CPPFLAGS}
- ## jpeglib does not support pkg-config, although some OSes add it.
- ## This is untested.
- if "${PKGCONF}" --exists jpeg; then
- JPG_CPPFLAGS=`"${PKGCONF}" --cflags jpeg`
- JPG_LIBS=`"${PKGCONF}" --libs jpeg`
+ ## IJG version 9c (Jan 2018) has support as libjpeg.
+ ## libjpeg-turbo has had this for a while.
+ if "${PKGCONF}" --exists libjpeg; then
+ JPG_CPPFLAGS=`"${PKGCONF}" --cflags libjpeg`
+ JPG_LIBS=`"${PKGCONF}" --libs libjpeg`
CPPFLAGS="${CPPFLAGS} ${JPG_CPPFLAGS}"
fi
_R_HEADER_JPEGLIB
diff --git a/share/texmf/bibtex/bib/RJournal.bib b/share/texmf/bibtex/bib/RJournal.bib
index 37390eb..3c7d632 100644
--- a/share/texmf/bibtex/bib/RJournal.bib
+++ b/share/texmf/bibtex/bib/RJournal.bib
@@ -3,309 +3,6 @@
-
-@article{RJ-2017-034,
- author = {Heather Savoy and Falk Heße and Yoram Rubin},
- title = {{anchoredDistr: a Package for the Bayesian Inversion of
- Geostatistical Parameters with Multi-type and Multi-scale
- Data}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-034/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-035,
- author = {Taylor Arnold},
- title = {{A Tidy Data Model for Natural Language Processing using
- cleanNLP}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-035/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-036,
- author = {Giorgio Alfredo Spedicato},
- title = {{Discrete Time Markov Chains with R}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-036/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-037,
- author = {Tyson S. Barrett and Emily Brignone},
- title = {{Furniture for Quantitative Scientists}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-037/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-038,
- author = {Marius Pfeuffer},
- title = {{ctmcd: An R Package for Estimating the Parameters of a
- Continuous-Time Markov Chain from Discrete-Time Data}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-038/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-039,
- author = {Robert J. Gutierrez and Bradley C. Boehmke and Kenneth W.
- Bauer and Cade M. Saie and Trevor J. Bihl},
- title = {{anomalyDetection: Implementation of Augmented Network Log
- Anomaly Detection Procedures}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-039/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-040,
- author = {Nicolae Teodor Melita and Stefan Holban},
- title = {{dGAselID: An R Package for Selecting a Variable Number of
- Features in High Dimensional Data}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-040/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-041,
- author = {Melanie Prague and Rui Wang and Victor De Gruttola},
- title = {{CRTgeeDR: an R Package for Doubly Robust Generalized
- Estimating Equations Estimations in Cluster Randomized
- Trials with Missing Data.}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-041/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-042,
- author = {Aurélie Siberchicot and Alice Julien-Laferrière and Anne-
- Béatrice Dufour and Jean Thioulouse and Stéphane Dray},
- title = {{adegraphics: An S4 Lattice-Based Package for the
- Representation of Multivariate Data}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-042/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-043,
- author = {Mirta Benšić and Petar Taler and Safet Hamedović and
- Emmanuel Karlo Nyarko and Kristian Sabo},
- title = {{LeArEst: Length and Area Estimation from Data Measured with
- Additive Error}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-043/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-044,
- author = {Guillermo Basulto-Elias and Alicia Carriquiry and Kris De
- Brabanter and Daniel J. Nordman},
- title = {{fourierin: An R package to compute Fourier integrals}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-044/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-045,
- author = {Rafael Benítez and Vicente J. Bolós and José-Luis Toca-
- Herrera},
- title = {{afmToolkit: an R Package for Automated AFM Force-Distance
- Curves Analysis}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-045/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-046,
- author = {Patrick Breheny and Woodrow Burchett},
- title = {{Visualization of Regression Models Using visreg}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-046/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-047,
- author = {Michael Hahsler},
- title = {{arulesViz: Interactive Visualization of Association Rules
- with R}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-047/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-048,
- author = {Muhammad Imdadullah and Muhammad Aslam and Saima Altaf},
- title = {{liureg: A Comprehensive R Package for the Liu Estimation of
- Linear Regression Model with Collinear Regressors}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-048/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-049,
- author = {Pablo J. Villacorta},
- title = {{The welchADF Package for Robust Hypothesis Testing in
- Unbalanced Multivariate Mixed Models with Heteroscedastic
- and Non-normal Data}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-049/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-050,
- author = {Clifford Anderson-Bergman},
- title = {{Bayesian Regression Models for Interval-censored Data in R}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-050/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-051,
- author = {Pedro Cañadilla Jiménez and Yolanda Román Montoya},
- title = {{queueing: A Package For Analysis Of Queueing Networks and
- Models in R}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-051/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-052,
- author = {Nicholas Syring and Meng Li},
- title = {{BayesBD: An R Package for Bayesian Inference on Image
- Boundaries}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-052/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-053,
- author = {Ruby Sharma and Sajal Kumar and Hua Zhong and Mingzhou Song},
- title = {{Simulating Noisy, Nonparametric, and Multivariate Discrete
- Patterns}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-053/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-054,
- author = {Hideitsu Hino},
- title = {{ider: Intrinsic Dimension Estimation with R}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-054/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-055,
- author = {Josmar Mazucheli and André Felipe B. Menezes and Saralees
- Nadarajah},
- title = {{mle.tools: An R Package for Maximum Likelihood Bias
- Correction}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-055/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-056,
- author = {Andreas Beger and Daniel W. Hill and Jr. and Nils. W.
- Metternich and Shahryar Minhas and Michael D. Ward},
- title = {{Splitting It Up: The spduration Split-Population Duration
- Regression Package for Time-varying Covariates}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-056/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-057,
- author = {Nathan Medina-Rodríguez and Ángelo Santana},
- title = {{Allele Imputation and Haplotype Determination from Databases
- Composed of Nuclear Families}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-057/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
-
-@article{RJ-2017-058,
- author = {David J. Winter},
- title = {{rentrez: An R package for the NCBI eUtils API}},
- year = {2017},
- journal = {{The R Journal}},
- url = {https://journal.r-project.org/archive/2017/RJ-2017-058/index.html}
- note = {Accepted, may change after copy-editing.}
-}
-
-
@@ -5261,3 +4958,682 @@
+
+
+
+
+
+@Article{editorial:2017,
+ author = {Roger Bivand},
+ title = {Editorial},
+ journal = {The R Journal},
+ year = 2017,
+ volume = 9,
+ number = 2,
+ pages = {4--5},
+ month = dec,
+ url = {http://journal.r-project.org/archive/2017-2/editorial.pdf}
+}
+
+
+
+
+
+
+
+
+
+@article{RJ-2017-034,
+ author = {Heather Savoy and Falk Heße and Yoram Rubin},
+ title = {{anchoredDistr: a Package for the Bayesian Inversion of
+ Geostatistical Parameters with Multi-type and Multi-scale
+ Data}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-034/index.html},
+ pages = {6--17},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-040,
+ author = {Nicolae Teodor Melita and Stefan Holban},
+ title = {{dGAselID: An R Package for Selecting a Variable Number of
+ Features in High Dimensional Data}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-040/index.html},
+ pages = {18--34},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-057,
+ author = {Nathan Medina-Rodríguez and Ángelo Santana},
+ title = {{Allele Imputation and Haplotype Determination from Databases
+ Composed of Nuclear Families}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-057/index.html},
+ pages = {35--55},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-046,
+ author = {Patrick Breheny and Woodrow Burchett},
+ title = {{Visualization of Regression Models Using visreg}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-046/index.html},
+ pages = {56--71},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-044,
+ author = {Guillermo Basulto-Elias and Alicia Carriquiry and Kris De
+ Brabanter and Daniel J. Nordman},
+ title = {{fourierin: An R package to compute Fourier integrals}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-044/index.html},
+ pages = {72--83},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-036,
+ author = {Giorgio Alfredo Spedicato},
+ title = {{Discrete Time Markov Chains with R}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-036/index.html},
+ pages = {84--104},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-041,
+ author = {Melanie Prague and Rui Wang and Victor De Gruttola},
+ title = {{CRTgeeDR: an R Package for Doubly Robust Generalized
+ Estimating Equations Estimations in Cluster Randomized
+ Trials with Missing Data}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-041/index.html},
+ pages = {105--115},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-051,
+ author = {Pedro Cañadilla Jiménez and Yolanda Román Montoya},
+ title = {{queueing: A Package For Analysis Of Queueing Networks and
+ Models in R}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-051/index.html},
+ pages = {116--126},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-038,
+ author = {Marius Pfeuffer},
+ title = {{ctmcd: An R Package for Estimating the Parameters of a
+ Continuous-Time Markov Chain from Discrete-Time Data}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-038/index.html},
+ pages = {127--141},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-037,
+ author = {Tyson S. Barrett and Emily Brignone},
+ title = {{Furniture for Quantitative Scientists}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-037/index.html},
+ pages = {142--148},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-052,
+ author = {Nicholas Syring and Meng Li},
+ title = {{BayesBD: An R Package for Bayesian Inference on Image
+ Boundaries}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-052/index.html},
+ pages = {149--162},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-047,
+ author = {Michael Hahsler},
+ title = {{arulesViz: Interactive Visualization of Association Rules
+ with R}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-047/index.html},
+ pages = {163--175},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-060,
+ author = {Xuwen Zhu and Volodymyr Melnykov},
+ title = {{ManlyMix: An R Package for Manly Mixture Modeling}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-060/index.html},
+ pages = {176--197},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-042,
+ author = {Aurélie Siberchicot and Alice Julien-Laferrière and Anne-
+ Béatrice Dufour and Jean Thioulouse and Stéphane Dray},
+ title = {{adegraphics: An S4 Lattice-Based Package for the
+ Representation of Multivariate Data}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-042/index.html},
+ pages = {198--212},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-064,
+ author = {Chao Wang and Kung-Sik Chan},
+ title = {{carx: an R Package to Estimate Censored Autoregressive Time
+ Series with Exogenous Covariates}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-064/index.html},
+ pages = {213--231},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-048,
+ author = {Muhammad Imdadullah and Muhammad Aslam and Saima Altaf},
+ title = {{liureg: A Comprehensive R Package for the Liu Estimation of
+ Linear Regression Model with Collinear Regressors}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-048/index.html},
+ pages = {232--247},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-035,
+ author = {Taylor Arnold},
+ title = {{A Tidy Data Model for Natural Language Processing using
+ cleanNLP}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-035/index.html},
+ pages = {248--267},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-055,
+ author = {Josmar Mazucheli and André Felipe B. Menezes and Saralees
+ Nadarajah},
+ title = {{mle.tools: An R Package for Maximum Likelihood Bias
+ Correction}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-055/index.html},
+ pages = {268--290},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-045,
+ author = {Rafael Benítez and Vicente J. Bolós and José-Luis Toca-
+ Herrera},
+ title = {{afmToolkit: an R Package for Automated AFM Force-Distance
+ Curves Analysis}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-045/index.html},
+ pages = {291--308},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-049,
+ author = {Pablo J. Villacorta},
+ title = {{The welchADF Package for Robust Hypothesis Testing in
+ Unbalanced Multivariate Mixed Models with Heteroscedastic
+ and Non-normal Data}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-049/index.html},
+ pages = {309--328},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-054,
+ author = {Hideitsu Hino},
+ title = {{ider: Intrinsic Dimension Estimation with R}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-054/index.html},
+ pages = {329--341},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-068,
+ author = {Annabel Allison and Ian R White and Simon Bond},
+ title = {{rpsftm: An R Package for Rank Preserving Structural Failure
+ Time Models}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-068/index.html},
+ pages = {342--353},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-039,
+ author = {Robert J. Gutierrez and Bradley C. Boehmke and Kenneth W.
+ Bauer and Cade M. Saie and Trevor J. Bihl},
+ title = {{anomalyDetection: Implementation of Augmented Network Log
+ Anomaly Detection Procedures}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-039/index.html},
+ pages = {354--365},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-053,
+ author = {Ruby Sharma and Sajal Kumar and Hua Zhong and Mingzhou Song},
+ title = {{Simulating Noisy, Nonparametric, and Multivariate Discrete
+ Patterns}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-053/index.html},
+ pages = {366--377},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-066,
+ author = {Mollie E. Brooks and Kasper Kristensen and Koen J. van
+ Benthem and Arni Magnusson and Casper W. Berg and Anders
+ Nielsen and Hans J. Skaug and Martin Mächler and Benjamin M.
+ Bolker},
+ title = {{glmmTMB Balances Speed and Flexibility Among Packages for
+ Zero-inflated Generalized Linear Mixed Modeling}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-066/index.html},
+ pages = {378--400},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-059,
+ author = {Christopher Gandrud and Laron K. Williams},
+ title = {{Simulating Probabilistic Long-Term Effects in Models with
+ Temporal Dependence}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-059/index.html},
+ pages = {401--408},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-067,
+ author = {Jannes Muenchow and Patrick Schratz and Alexander Brenning},
+ title = {{RQGIS: Integrating R with QGIS for Statistical Geocomputing}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-067/index.html},
+ pages = {409--428},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-061,
+ author = {Robin K. S. Hankin},
+ title = {{Partial Rank Data with the hyper2 Package: Likelihood
+ Functions for Generalized Bradley-Terry Models}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-061/index.html},
+ pages = {429--439},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-062,
+ author = {Brice Ozenne and Anne Lyngholm Sørensen and Thomas Scheike
+ and Christian Torp-Pedersen and Thomas Alexander Gerds},
+ title = {{riskRegression: Predicting the Risk of an Event using Cox
+ Regression Models}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-062/index.html},
+ pages = {440--460},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-043,
+ author = {Mirta Benšić and Petar Taler and Safet Hamedović and
+ Emmanuel Karlo Nyarko and Kristian Sabo},
+ title = {{LeArEst: Length and Area Estimation from Data Measured with
+ Additive Error}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-043/index.html},
+ pages = {461--473},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-056,
+ author = {Andreas Beger and Daniel W. Hill and Jr. and Nils. W.
+ Metternich and Shahryar Minhas and Michael D. Ward},
+ title = {{Splitting It Up: The spduration Split-Population Duration
+ Regression Package for Time-Varying Covariates}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-056/index.html},
+ pages = {474--486},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-050,
+ author = {Clifford Anderson-Bergman},
+ title = {{Bayesian Regression Models for Interval-censored Data in R}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-050/index.html},
+ pages = {487--498},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-063,
+ author = {Travis Canida and John Ihrie},
+ title = {{openEBGM: An R Implementation of the Gamma-Poisson Shrinker
+ Data Mining Model}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-063/index.html},
+ pages = {499--519},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-058,
+ author = {David J. Winter},
+ title = {{rentrez: An R package for the NCBI eUtils API}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-058/index.html},
+ pages = {520--526},
+ volume = {9},
+ number = {2}
+}
+
+
+
+@article{RJ-2017-065,
+ author = {Carl Boettiger and Dirk Eddelbuettel},
+ title = {{An Introduction to Rocker: Docker Containers for R}},
+ year = {2017},
+ journal = {{The R Journal}},
+ url = {https://journal.r-project.org/archive/2017/RJ-2017-065/index.html},
+ pages = {527--536},
+ volume = {9},
+ number = {2}
+}
+
+
+
+
+
+
+
+
+
+
+@Article{useR2017:2017,
+ author = {Tobias Verbeke},
+ title = {Conference Report: useR!2017},
+ journal = {The R Journal},
+ year = 2017,
+ volume = 9,
+ number = 2,
+ pages = {537--538},
+ month = dec,
+ url = {http://journal.r-project.org/archive/2017-2/useR2017.pdf}
+}
+
+
+
+
+
+
+
+
+@Article{insurance:2017,
+ author = {Nicolas Baradel and Christophe Dutang and Caroline Hillairet},
+ title = {Conference Report: R in Insurance 2017},
+ journal = {The R Journal},
+ year = 2017,
+ volume = 9,
+ number = 2,
+ pages = {539--540},
+ month = dec,
+ url = {http://journal.r-project.org/archive/2017-2/insurance.pdf}
+}
+
+
+
+
+
+
+
+
+@Article{forwards:2017,
+ author = {Stella Bollmann and Dianne Cook and Jasmine Dumas and John
+ Fox and Julie Josse and Oliver Keyes and Carolin Strobl and
+ Heather Turner and Rudolf Debelak},
+ title = {Forwards Column},
+ journal = {The R Journal},
+ year = 2017,
+ volume = 9,
+ number = 2,
+ pages = {541--552},
+ month = dec,
+ url = {http://journal.r-project.org/archive/2017-2/forwards.pdf}
+}
+
+
+
+
+
+
+
+
+@Article{teaching:2017,
+ author = {Matthias Gehrke and Reed Davis and Norman Matloff and Paul
+ Thompson and Tiffany Chen and Emily Watkins and Laurel
+ Beckett},
+ title = {R Teaching Column},
+ journal = {The R Journal},
+ year = 2017,
+ volume = 9,
+ number = 2,
+ pages = {553--562},
+ month = dec,
+ url = {http://journal.r-project.org/archive/2017-2/teaching.pdf}
+}
+
+
+
+
+
+
+
+
+@Article{foundation:2017,
+ author = {Torsten Hothorn},
+ title = {R Foundation News},
+ journal = {The R Journal},
+ year = 2017,
+ volume = 9,
+ number = 2,
+ pages = {563--563},
+ month = dec,
+ url = {http://journal.r-project.org/archive/2017-2/foundation.pdf}
+}
+
+
+
+
+
+
+
+
+@Article{cran:2017,
+ author = {Kurt Hornik and Uwe Ligges and Achim Zeileis},
+ title = {Changes on CRAN},
+ journal = {The R Journal},
+ year = 2017,
+ volume = 9,
+ number = 2,
+ pages = {564--566},
+ month = dec,
+ url = {http://journal.r-project.org/archive/2017-2/cran.pdf}
+}
+
+
+
+
+
+
+
+
+@Article{bioc:2017,
+ author = {Bioconductor Core Team},
+ title = {News from the Bioconductor Project},
+ journal = {The R Journal},
+ year = 2017,
+ volume = 9,
+ number = 2,
+ pages = {567--567},
+ month = dec,
+ url = {http://journal.r-project.org/archive/2017-2/bioc.pdf}
+}
+
+
+
+
+
+
+
+
+@Article{ch:2017,
+ author = {R Core Team},
+ title = {Changes in R},
+ journal = {The R Journal},
+ year = 2017,
+ volume = 9,
+ number = 2,
+ pages = {568--570},
+ month = dec,
+ url = {http://journal.r-project.org/archive/2017-2/ch.pdf}
+}
+
+
+
+
+
diff --git a/src/extra/tzone/Make.zi b/src/extra/tzone/Make.zi
index 599067b..3fb4174 100644
--- a/src/extra/tzone/Make.zi
+++ b/src/extra/tzone/Make.zi
@@ -1,6 +1,6 @@
## Makefile to be run on a Unix box with zic
-VERSION = 2017c
+VERSION = 2018c
TZDIR = zoneinfo
TZTMP = tz
TARFILE = tzdata$(VERSION).tar.gz
diff --git a/src/extra/tzone/Notes b/src/extra/tzone/Notes
index 5476f2c..a814802 100644
--- a/src/extra/tzone/Notes
+++ b/src/extra/tzone/Notes
@@ -22,11 +22,11 @@ R's implemntation, where time_t is int_fast64_t, hence signed.)
To remake it, download the current version of tzdataXXXXx.tar.gz from
http://www.iana.org/time-zones to this directory and run
-make -f Make.zi VERSION=2017c
+make -f Make.zi VERSION=2018c
for the appropriate version. If zic is not on the path, use something like
-make -f Make.zi VERSION=2017c ZIC=/usr/sbin/zic
+make -f Make.zi VERSION=2018c ZIC=/usr/sbin/zic
NB: it seems that this needs to be done on a system with 64-bit time_t
or the catalogs will be confined to 1902-2038. And even that did not
diff --git a/src/extra/tzone/zoneinfo.zip b/src/extra/tzone/zoneinfo.zip
index fa13253..6f23dd5 100644
--- a/src/extra/tzone/zoneinfo.zip
+++ b/src/extra/tzone/zoneinfo.zip
Binary files differ
diff --git a/src/gnuwin32/CHANGES.Rd b/src/gnuwin32/CHANGES.Rd
index 6594160..12e3bb6 100644
--- a/src/gnuwin32/CHANGES.Rd
+++ b/src/gnuwin32/CHANGES.Rd
@@ -428,7 +428,7 @@
\subsection{NEW FEATURES}{
\itemize{
\item Building badly-written vignettes which used the default
- device (\code{pdf(file = "Rplots.pdf")} could leave the device
+ device (\code{pdf(file = "Rplots.pdf")}) could leave the device
open and hence the file \file{Rplots.pdf} could not be removed on
Windows: all devices are now closed.
}
diff --git a/src/gnuwin32/front-ends/Rfe.c b/src/gnuwin32/front-ends/Rfe.c
index 3235cb9..d79b54e 100644
--- a/src/gnuwin32/front-ends/Rfe.c
+++ b/src/gnuwin32/front-ends/Rfe.c
@@ -63,12 +63,11 @@ int main (int argc, char **argv)
} else if ((p = getenv("R_ARCH")))
strncpy(arch, p+1, 10); /* skip leading slash */
-
if (stricmp(argv[0] + strlen(argv[0]) - 11, "Rscript.exe") == 0
|| stricmp(argv[0] + strlen(argv[0]) - 7, "Rscript") == 0)
- snprintf(cmd, CMD_LEN, "\"%s\\bin\\%s\\Rscript.exe\"", getRHOME(2), arch);
+ snprintf(cmd, CMD_LEN, "\"\"%s\\bin\\%s\\Rscript.exe\"", getRHOME(2), arch);
else {
- snprintf(cmd, CMD_LEN, "\"%s\\bin\\%s\\R.exe\"", getRHOME(2), arch);
+ snprintf(cmd, CMD_LEN, "\"\"%s\\bin\\%s\\R.exe\"", getRHOME(2), arch);
interactive = 1;
}
@@ -83,6 +82,8 @@ int main (int argc, char **argv)
strcat(cmd, "\"");
} else strcat(cmd, argv[i]);
}
+ /* the outermost double quotes are needed for cmd.exe */
+ strcat(cmd, "\"");
if (interactive)
/* Ignore Ctrl-C so that Rterm.exe can handle it */
diff --git a/src/gnuwin32/front-ends/rcmdfn.c b/src/gnuwin32/front-ends/rcmdfn.c
index cba4969..fb2fb1e 100644
--- a/src/gnuwin32/front-ends/rcmdfn.c
+++ b/src/gnuwin32/front-ends/rcmdfn.c
@@ -160,7 +160,7 @@ int rcmdfn (int cmdarg, int argc, char **argv)
fprintf(stdout, "%s", getRHOME(3));
return(0);
}
- snprintf(cmd, CMD_LEN, "\"%s/%s/Rterm.exe\"", getRHOME(3), BINDIR);
+ snprintf(cmd, CMD_LEN, "\"\"%s/%s/Rterm.exe\"", getRHOME(3), BINDIR);
for (i = cmdarg + 1; i < argc; i++){
strcat(cmd, " ");
if (strlen(cmd) + strlen(argv[i]) > 9900) {
@@ -173,6 +173,8 @@ int rcmdfn (int cmdarg, int argc, char **argv)
strcat(cmd, "\"");
} else strcat(cmd, argv[i]);
}
+ /* the outermost double quotes are needed for cmd.exe */
+ strcat(cmd, "\"");
/* R.exe should ignore Ctrl-C, and let Rterm.exe handle it */
SetConsoleCtrlHandler(NULL, TRUE);
return system(cmd);
@@ -276,6 +278,7 @@ int rcmdfn (int cmdarg, int argc, char **argv)
}
/* Unix has --restore --save --no-readline */
+ /* cmd is used with CreateProcess, hence no outermost double quotes */
snprintf(cmd, CMD_LEN, "\"%s/%s/Rterm.exe\" -f \"%s\" --restore --save",
getRHOME(3), BINDIR, infile);
if(strlen(cmd) + strlen(cmd_extra) >= CMD_LEN) {
@@ -389,7 +392,7 @@ int rcmdfn (int cmdarg, int argc, char **argv)
PROCESS_CMD("nextArg");
} else if (!strcmp(argv[cmdarg], "REMOVE")) {
snprintf(cmd, CMD_LEN,
- "\"%s/%s/Rterm.exe\" -f \"%s/share/R/REMOVE.R\" R_DEFAULT_PACKAGES=NULL --no-restore --slave --args",
+ "\"\"%s/%s/Rterm.exe\" -f \"%s/share/R/REMOVE.R\" R_DEFAULT_PACKAGES=NULL --no-restore --slave --args",
getRHOME(3), BINDIR, getRHOME(3));
for (i = cmdarg + 1; i < argc; i++){
strcat(cmd, " ");
@@ -404,6 +407,8 @@ int rcmdfn (int cmdarg, int argc, char **argv)
strcat(cmd, "\"");
} else strcat(cmd, argv[i]);
}
+ /* the outermost double quotes are needed for cmd.exe */
+ strcat(cmd, "\"");
return(system(cmd));
} else if (!strcmp(argv[cmdarg], "build")) {
snprintf(cmd, CMD_LEN,
@@ -467,14 +472,14 @@ int rcmdfn (int cmdarg, int argc, char **argv)
/* not one of those handled internally */
p = argv[cmdarg];
if (!strcmp(p, "config"))
- snprintf(cmd, CMD_LEN, "sh %s/bin/config.sh", RHome);
+ snprintf(cmd, CMD_LEN, "\"sh \"%s/bin/config.sh\"", RHome);
else if (!strcmp(p, "open"))
- snprintf(cmd, CMD_LEN, "%s/%s/open.exe", RHome, BINDIR);
+ snprintf(cmd, CMD_LEN, "\"\"%s/%s/open.exe\"", RHome, BINDIR);
else {
/* RHOME/BINDIR is first in the path, so looks there first */
- if (!strcmp(".sh", p + strlen(p) - 3)) strcpy(cmd, "sh ");
- else if (!strcmp(".pl", p + strlen(p) - 3)) strcpy(cmd, "perl ");
- else strcpy(cmd, "");
+ if (!strcmp(".sh", p + strlen(p) - 3)) strcpy(cmd, "\"sh ");
+ else if (!strcmp(".pl", p + strlen(p) - 3)) strcpy(cmd, "\"perl ");
+ else strcpy(cmd, "\"");
strcat(cmd, p);
}
@@ -490,6 +495,8 @@ int rcmdfn (int cmdarg, int argc, char **argv)
strcat(cmd, "\"");
} else strcat(cmd, argv[i]);
}
+ /* the outermost double quotes are needed for cmd.exe */
+ strcat(cmd, "\"");
/* printf("cmd is %s\n", cmd); */
status = system(cmd);
}
diff --git a/src/include/Rmath.h0.in b/src/include/Rmath.h0.in
index 1e4d1a0..85aac67 100644
--- a/src/include/Rmath.h0.in
+++ b/src/include/Rmath.h0.in
@@ -601,6 +601,9 @@ double bessel_y_ex(double, double, double *);
#ifndef HAVE_HYPOT
double hypot(double, double);
#endif
+/* This is a legacy declaration: the entry point was removed in
+ R 2.14.0 (2011-10). But the declaration was still used by a package
+ in 2018-03 */
double pythag(double, double);
#ifndef HAVE_EXPM1
double expm1(double); /* = exp(x)-1 {care for small x} */
diff --git a/src/library/Recommended/MASS.tgz b/src/library/Recommended/MASS.tgz
index b7bd225..5aef0d0 120000
--- a/src/library/Recommended/MASS.tgz
+++ b/src/library/Recommended/MASS.tgz
@@ -1 +1 @@
-MASS_7.3-47.tar.gz \ No newline at end of file
+MASS_7.3-49.tar.gz \ No newline at end of file
diff --git a/src/library/Recommended/MASS_7.3-47.tar.gz b/src/library/Recommended/MASS_7.3-47.tar.gz
deleted file mode 100644
index 0981d2f..0000000
--- a/src/library/Recommended/MASS_7.3-47.tar.gz
+++ /dev/null
Binary files differ
diff --git a/src/library/Recommended/MASS_7.3-49.tar.gz b/src/library/Recommended/MASS_7.3-49.tar.gz
new file mode 100644
index 0000000..7f28d23
--- /dev/null
+++ b/src/library/Recommended/MASS_7.3-49.tar.gz
Binary files differ
diff --git a/src/library/Recommended/Matrix_1.2-12.tar.gz b/src/library/Recommended/Matrix_1.2-12.tar.gz
index f829e4e..ffacf2d 100644
--- a/src/library/Recommended/Matrix_1.2-12.tar.gz
+++ b/src/library/Recommended/Matrix_1.2-12.tar.gz
Binary files differ
diff --git a/src/library/Recommended/mgcv.tgz b/src/library/Recommended/mgcv.tgz
index a88e6e5..1048460 120000
--- a/src/library/Recommended/mgcv.tgz
+++ b/src/library/Recommended/mgcv.tgz
@@ -1 +1 @@
-mgcv_1.8-22.tar.gz \ No newline at end of file
+mgcv_1.8-23.tar.gz \ No newline at end of file
diff --git a/src/library/Recommended/mgcv_1.8-22.tar.gz b/src/library/Recommended/mgcv_1.8-22.tar.gz
deleted file mode 100644
index 1aa80e0..0000000
--- a/src/library/Recommended/mgcv_1.8-22.tar.gz
+++ /dev/null
Binary files differ
diff --git a/src/library/Recommended/mgcv_1.8-23.tar.gz b/src/library/Recommended/mgcv_1.8-23.tar.gz
new file mode 100644
index 0000000..7b47513
--- /dev/null
+++ b/src/library/Recommended/mgcv_1.8-23.tar.gz
Binary files differ
diff --git a/src/library/Recommended/nlme.tgz b/src/library/Recommended/nlme.tgz
index 8174020..2aad2f7 120000
--- a/src/library/Recommended/nlme.tgz
+++ b/src/library/Recommended/nlme.tgz
@@ -1 +1 @@
-nlme_3.1-131.tar.gz \ No newline at end of file
+nlme_3.1-131.1.tar.gz \ No newline at end of file
diff --git a/src/library/Recommended/nlme_3.1-131.1.tar.gz b/src/library/Recommended/nlme_3.1-131.1.tar.gz
new file mode 100644
index 0000000..8c865c0
--- /dev/null
+++ b/src/library/Recommended/nlme_3.1-131.1.tar.gz
Binary files differ
diff --git a/src/library/Recommended/nlme_3.1-131.tar.gz b/src/library/Recommended/nlme_3.1-131.tar.gz
deleted file mode 100644
index 7574f42..0000000
--- a/src/library/Recommended/nlme_3.1-131.tar.gz
+++ /dev/null
Binary files differ
diff --git a/src/library/Recommended/rpart.tgz b/src/library/Recommended/rpart.tgz
index 7c05567..a5e3c5d 120000
--- a/src/library/Recommended/rpart.tgz
+++ b/src/library/Recommended/rpart.tgz
@@ -1 +1 @@
-rpart_4.1-11.tar.gz \ No newline at end of file
+rpart_4.1-13.tar.gz \ No newline at end of file
diff --git a/src/library/Recommended/rpart_4.1-11.tar.gz b/src/library/Recommended/rpart_4.1-11.tar.gz
deleted file mode 100644
index 3682410..0000000
--- a/src/library/Recommended/rpart_4.1-11.tar.gz
+++ /dev/null
Binary files differ
diff --git a/src/library/Recommended/rpart_4.1-13.tar.gz b/src/library/Recommended/rpart_4.1-13.tar.gz
new file mode 100644
index 0000000..1bc6833
--- /dev/null
+++ b/src/library/Recommended/rpart_4.1-13.tar.gz
Binary files differ
diff --git a/src/library/base/R/conditions.R b/src/library/base/R/conditions.R
index cca254b..65c870b 100644
--- a/src/library/base/R/conditions.R
+++ b/src/library/base/R/conditions.R
@@ -40,18 +40,17 @@ tryCatch <- function(expr, ..., finally) {
expr
}
value <- doTryCatch(return(expr), name, parentenv, handler)
- # The return in the call above will exit withOneRestart unless
+ # The return in the call above will exit tryCatchOne unless
# the handler is invoked; we only get to this point if the handler
# is invoked. If we get here then the handler will have been
# popped off the internal handler stack.
- if (is.null(value[[1L]])) {
- # a simple error; message is stored internally
- # and call is in result; this defers all allocs until
- # after the jump
- msg <- .Internal(geterrmessage())
+ if (is.character(value[[1L]])) {
+ # a simple error; only the msg string is allocated before
+ # the jump
+ msg <- value[1L]
call <- value[[2L]]
cond <- simpleError(msg, call)
- }
+ }
else cond <- value[[1L]]
value[[3L]](cond)
}
diff --git a/src/library/base/R/datetime.R b/src/library/base/R/datetime.R
index 3055656..36cafe0 100644
--- a/src/library/base/R/datetime.R
+++ b/src/library/base/R/datetime.R
@@ -21,32 +21,143 @@ Sys.time <- function() .POSIXct(.Internal(Sys.time()))
## overridden on Windows
Sys.timezone <- function(location = TRUE)
{
- tz <- Sys.getenv("TZ", names = FALSE)
- if(!location || nzchar(tz)) return(Sys.getenv("TZ", unset = NA_character_))
- lt <- normalizePath("/etc/localtime") # most Linux, macOS, ...
- if (grepl(pat <- "^/usr/share/zoneinfo/", lt) ||
- grepl(pat <- "^/usr/share/zoneinfo.default/", lt)) sub(pat, "", lt)
- else if(grepl(pat <- ".*/zoneinfo/(.*)", lt)) sub(pat, "\\1", lt)
- else if (lt == "/etc/localtime" && file.exists("/etc/timezone") &&
- dir.exists("/usr/share/zoneinfo") &&
- { # Debian etc.
- info <- file.info(normalizePath("/etc/timezone"),
- extra_cols = FALSE)
- (!info$isdir && info$size <= 200L)
- } && {
- tz1 <- tryCatch(readBin("/etc/timezone", "raw", 200L),
- error = function(e) raw(0L))
- length(tz1) > 0L &&
- all(tz1 %in% as.raw(c(9:10, 13L, 32:126)))
- } && {
- tz2 <- gsub("^[[:space:]]+|[[:space:]]+$", "", rawToChar(tz1))
- tzp <- file.path("/usr/share/zoneinfo", tz2)
- file.exists(tzp) && !dir.exists(tzp) &&
- identical(file.size(normalizePath(tzp)),
- file.size(lt))
- })
- tz2
- else NA_character_
+ if(!location) {
+ .Deprecated(msg = "Sys.timezone(location = FALSE) is deprecated")
+ return(NA_character_)
+ }
+ tz <- Sys.getenv("TZ")
+ if(nzchar(tz)) return(tz)
+
+ ## At least tzcode and glibc respect TZDIR.
+ ## musl does not mention it, just reads /etc/localtime (as from 1.1.13)
+ ## A search of /usr/share/zoneinfo, /share/zoneinfo, /etc/zoneinfo
+ ## is hardcoded.
+ ## Systems using --with-internal-tzcode will use the database at
+ ## file.path(R.home("share"), "zoneinfo"), but it is a reasonable
+ ## assumption that /etc/localtime is based on the system database.
+ tzdir <- Sys.getenv("TZDIR")
+ if(nzchar(tzdir) && !dir.exists(tzdir)) tzdir <- ""
+ if(!nzchar(tzdir)) { ## See comments in OlsonNames
+ if(dir.exists(tzdir <- "/usr/share/zoneinfo") ||
+ dir.exists(tzdir <- "/share/zoneinfo") ||
+ dir.exists(tzdir <- "/usr/share/lib/zoneinfo") ||
+ dir.exists(tzdir <- "/usrlib/zoneinfo") ||
+ dir.exists(tzdir <- "/usr/local/etc/zoneinfo") ||
+ dir.exists(tzdir <- "/etc/zoneinfo") ||
+ dir.exists(tzdir <- "/usr/etc/zoneinfo")) {
+ } else tzdir <- ""
+ }
+
+ ## First try timedatectl: should work on any modern Linux
+ ## as part of systemd (and probably nowhere else)
+ if (nzchar(Sys.which("timedatectl"))) {
+ inf <- system("timedatectl", intern = TRUE)
+ ## typical format:
+ ## " Time zone: Europe/London (GMT, +0000)"
+ ## " Time zone: Europe/Vienna (CET, +0100)"
+ lines <- grep("Time zone: ", inf)
+ if (length(lines)) {
+ tz <- sub(" .*", "", sub(" *Time zone: ", "", inf[lines[1L]]))
+ ## quick sanity check
+ if(nzchar(tzdir)) {
+ if(file.exists(file.path(tzdir, tz)))
+ return(tz)
+ else warning(sprintf("%s indicates the non-existent timezone name %s",
+ sQuote("timedatectl"), sQuote(tz)),
+ call. = FALSE, immediate. = TRUE, domain = NA)
+ } else
+ return(tz)
+ }
+ }
+
+ ## Debian/Ubuntu Linux do things differently, so try that next.
+ ## Derived loosely from PR#17186
+ ## As the Java sources say
+ ##
+ ## 'There's no spec of the file format available. This parsing
+ ## assumes that there's one line of an Olson tzid followed by a
+ ## '\n', no leading or trailing spaces, no comments.'
+ ##
+ ## but we do trim whitespace and do a sanity check (Java does not)
+ if (grepl("linux", R.Version()$platform, ignore.case = TRUE) &&
+ file.exists("/etc/timezone")) {
+ tz0 <- try(readLines("/etc/timezone"))
+ if(!inherits(tz0, "try-error") && length(tz0) == 1L) {
+ tz <- trimws(tz0)
+ ## quick sanity check
+ if(nzchar(tzdir)) {
+ if(file.exists(file.path(tzdir, tz)))
+ return(tz)
+ else warning(sprintf("%s indicates the non-existent timezone name %s",
+ sQuote("/etc/timezone"), sQuote(tz)),
+ call. = FALSE, immediate. = TRUE, domain = NA)
+ } else
+ return(tz)
+ }
+ }
+
+ ## non-Debian Linux (if not covered above), macOS, *BSD, ...
+ ## According to the glibc's (at least 2.26)
+ ## manual/time.texi, it can be configured to use
+ ## /etc/localtime or /usr/local/etc/localtime
+ ## This should be a symlink,
+ ## but people including Debian have copied files instead.
+ ## 'man 5 localtime' says (even on Debian)
+ ## 'Because the timezone identifier is extracted from the symlink
+ ## target name of /etc/localtime, this file may not be a normal
+ ## file or hardlink.'
+ ## tzcode mentions /usr/local/etc/zoneinfo/localtime
+ ## as the 'local time zone file' (not seen in the wild)
+ if ((file.exists(lt0 <- "/etc/localtime") ||
+ file.exists(lt0 <- "/usr/local/etc/localtime") ||
+ file.exists(lt0 <- "/usr/local/etc/zoneinfo/localtime")) &&
+ !is.na(lt <- Sys.readlink(lt0)) && nzchar(lt)) { # so it is a symlink
+ tz <- NA_character_
+ ## glibc and macOS < 10.13 this is a link into /usr/share/zoneinfo
+ ## (Debian Etch and later replaced it with a copy,
+ ## as have RHEL/Centos 6.x.)
+ ## macOS 10.13.0 is a link into /usr/share/zoneinfo.default
+ ## macOS 10.13.[12] is a link into /var/db/timezone/zoneinfo,
+ ## itself a link (with target different on different machines)
+ if ((nzchar(tzdir) && grepl(pat <- paste0("^", tzdir, "/"), lt)) ||
+ grepl(pat <- "^/usr/share/zoneinfo.default/", lt))
+ tz <- sub(pat, "", lt)
+ ## all the locations listed for OlsonNames end in zoneinfo
+ else if(grepl(pat <- ".*/zoneinfo/(.*)", lt))
+ tz <- sub(pat, "\\1", lt)
+ if(!is.na(tz))
+ return(tz)
+ else
+ message("unable to deduce timezone name from ", sQuote(lt))
+ }
+
+ ## Last-gasp (slow, several seconds) fallback: compare a
+ ## non-link lt0 to all the files under tzdir (as Java does).
+ ## This may match more than one tz file: we don't care which.
+ if (nzchar(tzdir) && # we already found lt0
+ (is.na(lt <- Sys.readlink(lt0)) || !nzchar(lt))) {
+ warning(sprintf("Your system is mis-configured: %s is not a symlink",
+ sQuote(lt0)),
+ call. = FALSE, immediate. = TRUE, domain = NA)
+ if(nzchar(Sys.which("cmp"))) {
+ known <- dir(tzdir, recursive = TRUE)
+ for(tz in known) {
+ status <- system2("cmp", c("-s", lt0, file.path(tzdir, tz)))
+ if (status == 0L) {
+ warning(sprintf("It is strongly recommended to set envionment variable TZ to %s (or equivalent)",
+ sQuote(tz)),
+ call. = FALSE, immediate. = TRUE, domain = NA)
+ return(tz)
+ }
+ }
+ warning(sprintf("%s is not identical to any known timezone file",
+ sQuote(lt0)),
+ call. = FALSE, immediate. = TRUE, domain = NA)
+ }
+ }
+
+ ## all heuristics have failed, so give up
+ NA_character_
}
as.POSIXlt <- function(x, tz = "", ...) UseMethod("as.POSIXlt")
@@ -1067,12 +1178,15 @@ OlsonNames <- function()
tzdir <- Sys.getenv("TZDIR", file.path(R.home("share"), "zoneinfo"))
else {
## Try known locations in turn.
- ## The list is not exhaustive (mac OS 10.13's real location is
- ## /usr/share/zoneinfo.default) and there is a risk that
+ ## The list is not exhaustive (mac OS 10.13's
+ ## /usr/share/zoneinfo is a symlink) and there is a risk that
## the wrong one is found.
- tzdirs <- c(Sys.getenv("TZDIR"),
+ ## We assume that if the second exists that the system was
+ ## configured with --with-internal-tzcode
+ tzdirs <- c(Sys.getenv("TZDIR"), # defaults to ""
file.path(R.home("share"), "zoneinfo"),
"/usr/share/zoneinfo", # Linux, macOS, FreeBSD
+ "/share/zoneinfo", # in musl's search
"/usr/share/lib/zoneinfo", # Solaris, AIX
"/usr/lib/zoneinfo", # early glibc
"/usr/local/etc/zoneinfo", # tzcode default
diff --git a/src/library/base/R/windows/system.R b/src/library/base/R/windows/system.R
index 869e480..2040a9c 100644
--- a/src/library/base/R/windows/system.R
+++ b/src/library/base/R/windows/system.R
@@ -1,7 +1,7 @@
# File src/library/base/R/windows/system.R
# Part of the R package, https://www.R-project.org
#
-# Copyright (C) 1995-2014 The R Core Team
+# Copyright (C) 1995-2017 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -74,10 +74,10 @@ system2 <- function(command, args = character(),
if(is.null(stdout)) stdout <- FALSE
if(is.null(stderr)) stderr <- FALSE
-
+
if(length(stdout) != 1L) stop("'stdout' must be of length 1")
if(length(stderr) != 1L) stop("'stderr' must be of length 1")
-
+
if (!is.null(input)) {
f <- tempfile()
on.exit(unlink(f))
@@ -125,9 +125,9 @@ shell.exec <- function(file) .Internal(shell.exec(file))
Sys.timezone <- function(location = TRUE)
{
- tz <- Sys.getenv("TZ", names = FALSE)
- if(nzchar(tz)) return(tz)
if(location) return(.Internal(tzone_name()))
+
+ .Deprecated(msg = "Sys.timezone(location = FALSE) is deprecated")
z <- as.POSIXlt(Sys.time())
zz <- attr(z, "tzone")
if(length(zz) == 3L) zz[2L + z$isdst] else zz[1L]
diff --git a/src/library/base/man/CallExternal.Rd b/src/library/base/man/CallExternal.Rd
index 62da94c..10c81f7 100644
--- a/src/library/base/man/CallExternal.Rd
+++ b/src/library/base/man/CallExternal.Rd
@@ -1,6 +1,6 @@
% File src/library/base/man/Foreign.Rd
% Part of the R package, https://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Copyright 1995-2018 R Core Team
% Distributed under GPL 2 or later
\name{CallExternal}
@@ -39,13 +39,13 @@
The functions are used to call compiled code which makes use of
internal \R objects, passing the arguments to the code as a sequence
of \R objects. They assume C calling conventions, so can usually
- also be used of C++ code.
+ also be used for C++ code.
For details about how to write code to use with these functions see
the chapter on \sQuote{System and foreign language interfaces} in
the \sQuote{Writing \R Extensions} manual. They differ in the way the
arguments are passed to the C code: \code{.External} allows for a
- variable number of arguments.
+ variable or unlimited number of arguments.
These functions are \link{primitive}, and \code{.NAME} is always
matched to the first argument supplied (which should not be named).
diff --git a/src/library/base/man/Comparison.Rd b/src/library/base/man/Comparison.Rd
index da1fabc..cf92b2a 100644
--- a/src/library/base/man/Comparison.Rd
+++ b/src/library/base/man/Comparison.Rd
@@ -31,7 +31,7 @@ x != y
\details{
The binary comparison operators are generic functions: methods can be
written for them individually or via the
- \code{\link[=S3groupGeneric]{Ops}}) group generic function. (See
+ \code{\link[=S3groupGeneric]{Ops}} group generic function. (See
\code{\link[=S3groupGeneric]{Ops}} for how dispatch is computed.)
Comparison of strings in character vectors is lexicographic within the
diff --git a/src/library/base/man/Extract.Rd b/src/library/base/man/Extract.Rd
index 37eec7d..f8451fa 100644
--- a/src/library/base/man/Extract.Rd
+++ b/src/library/base/man/Extract.Rd
@@ -273,7 +273,7 @@ x$name <- value
Character indices can in some circumstances be partially matched (see
\code{\link{pmatch}}) to the names or dimnames of the object being
subsetted (but never for subassignment). Unlike S (Becker \emph{et
- al} p.\sspace{}358)), \R never uses partial matching when extracting by
+ al} p.\sspace{}358), \R never uses partial matching when extracting by
\code{[}, and partial matching is not by default used by \code{[[}
(see argument \code{exact}).
@@ -310,7 +310,7 @@ x$name <- value
\code{\link{NULL}} for details of indexing null objects.
}
%% Fixme: Link (to html in 'help.start()', pdf from 'ref manual',
-%% 'info' from ESS, see \url{https://CRAN.R-project.org/manuals.html}.
+%% 'info' from ESS), see \url{https://CRAN.R-project.org/manuals.html}.
\examples{
x <- 1:12
diff --git a/src/library/base/man/Log.Rd b/src/library/base/man/Log.Rd
index 184ec3d..1e89853 100644
--- a/src/library/base/man/Log.Rd
+++ b/src/library/base/man/Log.Rd
@@ -85,7 +85,7 @@ expm1(x)
\code{log1p} and \code{expm1} may be taken from the operating system,
but if not available there then they are based on the Fortran subroutine
\code{dlnrel} by W. Fullerton of Los Alamos Scientific Laboratory (see
- \url{http://www.netlib.org/slatec/fnlib/dlnrel.f} and (for small x) a
+ \url{http://www.netlib.org/slatec/fnlib/dlnrel.f}) and (for small x) a
single Newton step for the solution of \code{log1p(y) = x}
respectively.
}
diff --git a/src/library/base/man/Logic.Rd b/src/library/base/man/Logic.Rd
index bb18f2f..82ec86f 100644
--- a/src/library/base/man/Logic.Rd
+++ b/src/library/base/man/Logic.Rd
@@ -28,7 +28,7 @@ isTRUE(x)
}
\arguments{
\item{x, y}{raw or logical or \sQuote{number-like} vectors (i.e., of types
- \code{\link{double}} (class \code{\link{numeric}}), \code{\link{integer}}
+ \code{\link{double}} (class \code{\link{numeric}}, \code{\link{integer}}
and \code{\link{complex}})), or objects for
which methods have been written.}
}
diff --git a/src/library/base/man/LongVectors.Rd b/src/library/base/man/LongVectors.Rd
index 4586b46..25b3db5 100644
--- a/src/library/base/man/LongVectors.Rd
+++ b/src/library/base/man/LongVectors.Rd
@@ -48,7 +48,7 @@
It is now possible to use \eqn{m \times n}{m x n} matrices with more
than 2 billion elements. Whether matrix algebra (including
\code{\link{\%*\%}}, \code{\link{crossprod}}, \code{\link{svd}},
- \code{\link{qr}}, \code{\link{solve}} and \code{\link{eigen}} will
+ \code{\link{qr}}, \code{\link{solve}} and \code{\link{eigen}}) will
actually work is somewhat implementation dependent, including the
Fortran compiler used and if an external BLAS or LAPACK is used.
diff --git a/src/library/base/man/NA.Rd b/src/library/base/man/NA.Rd
index eec2b94..023cce2 100644
--- a/src/library/base/man/NA.Rd
+++ b/src/library/base/man/NA.Rd
@@ -70,7 +70,7 @@ is.na(x) <- value
if the expression does not depend on the \code{NA} operand.
The default method for \code{anyNA} handles atomic vectors without a
- class and \code{NULL}. It calls \code{any(is.na(x)} on objects with
+ class and \code{NULL}. It calls \code{any(is.na(x))} on objects with
classes and for \code{recursive = FALSE}, on lists and pairlists.
}
\value{
diff --git a/src/library/base/man/Special.Rd b/src/library/base/man/Special.Rd
index e3fa151..e0d51f5 100644
--- a/src/library/base/man/Special.Rd
+++ b/src/library/base/man/Special.Rd
@@ -64,7 +64,7 @@ lfactorial(x)
for all real \code{x} except zero and negative integers (when
\code{NaN} is returned). There will be a warning on possible loss of
precision for values which are too close (within about
- \eqn{10^{-8}}{1e-8})) to a negative integer less than \samp{-10}.
+ \eqn{10^{-8}}{1e-8}) to a negative integer less than \samp{-10}.
\code{factorial(x)} (\eqn{x!} for non-negative integer \code{x})
is defined to be \code{gamma(x+1)} and \code{lfactorial} to be
diff --git a/src/library/base/man/Sys.localeconv.Rd b/src/library/base/man/Sys.localeconv.Rd
index 3d8d29f..7e7ac94 100644
--- a/src/library/base/man/Sys.localeconv.Rd
+++ b/src/library/base/man/Sys.localeconv.Rd
@@ -23,7 +23,7 @@ Sys.localeconv()
(when \R may not work correctly).
The monetary components will only be set to non-default values (see
- the \sQuote{Examples} section if the \code{LC_MONETARY} category is
+ the \sQuote{Examples} section) if the \code{LC_MONETARY} category is
set. It often is not set: set the examples for how to trigger setting it.
}
\value{
diff --git a/src/library/base/man/c.Rd b/src/library/base/man/c.Rd
index c7773c9..ba376d7 100644
--- a/src/library/base/man/c.Rd
+++ b/src/library/base/man/c.Rd
@@ -83,7 +83,7 @@ as.vector(x)
## append to a list:
ll <- list(A = 1, c = "C")
## do *not* use
-c(ll, d = 1:3) # which is == c(ll, as.list(c(d = 1:3))
+c(ll, d = 1:3) # which is == c(ll, as.list(c(d = 1:3)))
## but rather
c(ll, d = list(1:3)) # c() combining two lists
diff --git a/src/library/base/man/cbind.Rd b/src/library/base/man/cbind.Rd
index f1e1e7b..db23959 100644
--- a/src/library/base/man/cbind.Rd
+++ b/src/library/base/man/cbind.Rd
@@ -200,7 +200,7 @@ stopifnot(identical(df1, rbind(df, new, make.row.names=FALSE)),
d2 <- rbind.data.frame(as.list(df), as.list(new))
d3 <- rbind.data.frame(as.list(df), as.list(new), make.row.names=FALSE)
stopifnot(identical(.row_names_info(d3), -13L))
-## no longer: attr(d2, "row.names")[c(1,13)] == c("13", "131"))
+## no longer: attr(d2, "row.names")[c(1,13)] == c("13", "131")
row.names(d2) <- attr(d3, "row.names")# = 1:13
stopifnot(identical(d2, d3))
}
diff --git a/src/library/base/man/chartr.Rd b/src/library/base/man/chartr.Rd
index 8a711d5..c53ff85 100644
--- a/src/library/base/man/chartr.Rd
+++ b/src/library/base/man/chartr.Rd
@@ -50,7 +50,7 @@ casefold(x, upper = FALSE)
\code{x} (after possible coercion).
Elements of the result will be have the encoding declared as that of
- the current locale (see \code{\link{Encoding}} if the corresponding
+ the current locale (see \code{\link{Encoding}}) if the corresponding
input had a declared encoding and the current locale is either Latin-1
or UTF-8. The result will be in the current locale's encoding unless
the corresponding input was in UTF-8, when it will be in UTF-8 when
diff --git a/src/library/base/man/chkDots.Rd b/src/library/base/man/chkDots.Rd
index 7558c7c..ca0c5f3 100644
--- a/src/library/base/man/chkDots.Rd
+++ b/src/library/base/man/chkDots.Rd
@@ -6,7 +6,7 @@
utility to be used e.g., in S3 methods which need a formal \code{...}
argument but do not make any use of it. This helps catching user
errors in calling the function in question (which is the caller of
- \code{chkDots()}.
+ \code{chkDots()}).
}
\usage{
chkDots(..., which.call = -1, allowed = character(0))
diff --git a/src/library/base/man/chol.Rd b/src/library/base/man/chol.Rd
index 4375737..c2b8df8 100644
--- a/src/library/base/man/chol.Rd
+++ b/src/library/base/man/chol.Rd
@@ -54,7 +54,7 @@ chol(x, \dots)
The value of \code{tol} is passed to LAPACK, with negative values
selecting the default tolerance of (usually) \code{nrow(x) *
- .Machine$double.neg.eps * max(diag(x)}. The algorithm terminates once
+ .Machine$double.neg.eps * max(diag(x))}. The algorithm terminates once
the pivot is less than \code{tol}.
Unsuccessful results from the underlying LAPACK code will result in an
diff --git a/src/library/base/man/connections.Rd b/src/library/base/man/connections.Rd
index fd7d294..4d218e5 100644
--- a/src/library/base/man/connections.Rd
+++ b/src/library/base/man/connections.Rd
@@ -385,7 +385,7 @@ isIncomplete(con)
choose the appropriate byte order, some (including earlier versions of
\code{glibc}) will not. There is a subtle distinction between
\code{"UTF-16"} and \code{"UCS-2"} (see
- \url{https://en.wikipedia.org/wiki/UTF-16}: the use of characters in
+ \url{https://en.wikipedia.org/wiki/UTF-16}): the use of characters in
the \sQuote{Supplementary Planes} which need surrogate pairs is very
rare so \code{"UCS-2LE"} is an appropriate first choice (as it is more
widely implemented).
diff --git a/src/library/base/man/dput.Rd b/src/library/base/man/dput.Rd
index 97542e2..7dc2d15 100644
--- a/src/library/base/man/dput.Rd
+++ b/src/library/base/man/dput.Rd
@@ -35,7 +35,7 @@ dget(file, keep.source = FALSE)
Deparsing an object is difficult, and not always possible. With the
default \code{control}, \code{dput()} attempts to deparse in a way
that is readable, but for more complex or unusual objects (see
- \code{\link{dump}}, not likely
+ \code{\link{dump}}), not likely
to be parsed as identical to the original. Use \code{control = "all"}
for the most complete deparsing; use \code{control = NULL} for the
simplest deparsing, not even including attributes.
diff --git a/src/library/base/man/dynload.Rd b/src/library/base/man/dynload.Rd
index 5c546c2..15855d3 100644
--- a/src/library/base/man/dynload.Rd
+++ b/src/library/base/man/dynload.Rd
@@ -1,12 +1,13 @@
% File src/library/base/man/dynload.Rd
% Part of the R package, https://www.R-project.org
-% Copyright 1995-2017 R Core Team
+% Copyright 1995-2018 R Core Team
% Distributed under GPL 2 or later
\name{dyn.load}
\alias{dyn.load}
\alias{dyn.unload}
\alias{is.loaded}
+\alias{R_MAX_NUM_DLLS}
#ifdef windows
\alias{DLLpath}
#endif
@@ -163,15 +164,16 @@ is.loaded(symbol, PACKAGE = "", type = "")
By default, the maximum number of DLLs that can be loaded is 100,
which should be sufficient in almost all cases. As from \R 3.4.0, the
- maximum can be increased up to 1000 \emph{via} the environment
- variable \env{R_MAX_NUM_DLLS}, which has to be set before starting an
- \R{} session. On Unix, \env{R_MAX_NUM_DLLS} is in addition not
- allowed to be greater than 60\% of the OS limit on the number of open
- files (typically 1024, but 256 on macOS), which can sometimes be
- modified using command \command{ulimit -n} (\command{sh},
- \command{bash}) or \command{limit descriptors} (\command{csh}) in the
- shell used to launch \R{} . Increasing \env{R_MAX_NUM_DLLS} comes
- with some memory overhead.
+ maximum can be increased \emph{via} the environment variable
+ \env{R_MAX_NUM_DLLS}, which has to be set (to a value between 100 and
+ 1000 inclusive) before starting an \R{} session. On Unix,
+ \env{R_MAX_NUM_DLLS} is in addition not allowed to be greater than
+ 60\% of the OS limit on the number of open files (typically 1024, but
+ 256 on macOS), which can sometimes (including on macOS) be modified
+ using command \command{ulimit -n} (\command{sh}, \command{bash}) or
+ \command{limit descriptors} (\command{csh}) in the shell used to
+ launch \R{} . Increasing \env{R_MAX_NUM_DLLS} comes with some memory
+ overhead.
The creation of DLLs and the runtime linking of them into executing
programs is very platform dependent. In recent years there has been
diff --git a/src/library/base/man/factor.Rd b/src/library/base/man/factor.Rd
index 6d2ffe0..7181fe4 100644
--- a/src/library/base/man/factor.Rd
+++ b/src/library/base/man/factor.Rd
@@ -66,7 +66,7 @@ addNA(x, ifany = FALSE)
\item{nmax}{an upper bound on the number of levels; see \sQuote{Details}.}
\item{\dots}{(in \code{ordered(.)}): any of the above, apart from
\code{ordered} itself.}
- \item{ifany}{(only add an \code{NA} level if it is used, i.e.
+ \item{ifany}{only add an \code{NA} level if it is used, i.e.
if \code{any(is.na(x))}.}
}
\value{
diff --git a/src/library/base/man/files.Rd b/src/library/base/man/files.Rd
index 4d7a238..f6f5dc7 100644
--- a/src/library/base/man/files.Rd
+++ b/src/library/base/man/files.Rd
@@ -92,11 +92,11 @@ Sys.junction(from, to)
to the limitations of the OS's corresponding system call (see
something like \command{man 2 rename} on a Unix-alike): in particular
in the interpretation of \sQuote{file}: most platforms will not rename
- files across file systems. (On Windows, \code{file.rename} can move
- files but not directories between volumes.) On platforms which allow
- directories to be renamed, typically neither or both of \code{from}
- and \code{to} must a directory, and if \code{to} exists it must be an
- empty directory.
+ files from one file system to another. (On Windows,
+ \code{file.rename} can rename files but not directories across
+ volumes.) On platforms which allow directories to be renamed,
+ typically neither or both of \code{from} and \code{to} must a
+ directory, and if \code{to} exists it must be an empty directory.
\code{file.append} attempts to append the files named by its
second argument to those named by its first. The \R subscript
@@ -197,7 +197,8 @@ Sys.junction(from, to)
code. This is especially important for \code{file.rename}, which has
OS-specific restrictions (and note that the session temporary
directory is commonly on a different file system from the working
- directory).
+ directory): it is only portable to use \code{file.rename} to change
+ file name(s) within a single directory.
}
\author{
Ross Ihaka, Brian Ripley
diff --git a/src/library/base/man/format.Rd b/src/library/base/man/format.Rd
index bd5ae09..48340cc 100644
--- a/src/library/base/man/format.Rd
+++ b/src/library/base/man/format.Rd
@@ -79,7 +79,7 @@ format(x, \dots)
\details{
\code{format} is a generic function. Apart from the methods described
here there are methods for dates (see \code{\link{format.Date}}),
- date-times (see \code{\link{format.POSIXct}})) and for other classes such
+ date-times (see \code{\link{format.POSIXct}}) and for other classes such
as \code{format.octmode} and \code{format.dist}.
\code{format.data.frame} formats the data frame column by column,
diff --git a/src/library/base/man/formatc.Rd b/src/library/base/man/formatc.Rd
index be0cb59..a29ae42 100644
--- a/src/library/base/man/formatc.Rd
+++ b/src/library/base/man/formatc.Rd
@@ -159,7 +159,7 @@ prettyNum(x, big.mark = "", big.interval = 3L,
numbers, use \code{\link{format}}.
\code{prettyNum} is the utility function for prettifying \code{x}.
- \code{x} can be complex (or \code{\link{format}(<complex>)}, here. If
+ \code{x} can be complex (or \code{\link{format}(<complex>)}), here. If
\code{x} is not a character, \code{format(x[i], ...)} is applied to
each element, and then it is left unchanged if all the other arguments
are at their defaults. Use the \code{input.d.mark} argument for
diff --git a/src/library/base/man/funprog.Rd b/src/library/base/man/funprog.Rd
index 746625b..bac8773 100644
--- a/src/library/base/man/funprog.Rd
+++ b/src/library/base/man/funprog.Rd
@@ -126,7 +126,7 @@ cfrac(c(2, 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8))
## Iterative function application:
Funcall <- function(f, ...) f(...)
-## Compute log(exp(acos(cos(0))
+## Compute log(exp(acos(cos(0))))
Reduce(Funcall, list(log, exp, acos, cos), 0, right = TRUE)
## n-fold iterate of a function, functional style:
Iterate <- function(f, n = 1)
diff --git a/src/library/base/man/grep.Rd b/src/library/base/man/grep.Rd
index 2835dee..a36b529 100644
--- a/src/library/base/man/grep.Rd
+++ b/src/library/base/man/grep.Rd
@@ -109,7 +109,7 @@ regexec(pattern, text, ignore.case = FALSE, perl = FALSE,
\code{regexpr} it changes the interpretation of the output.
It inhibits the conversion of inputs with marked encodings, and is
forced if any input is found which is marked as \code{"bytes"}
- see \code{\link{Encoding}}).
+ (see \code{\link{Encoding}}).
Caseless matching does not make much sense for bytes in a multibyte
locale, and you should expect it only to work for ASCII characters if
diff --git a/src/library/base/man/labels.Rd b/src/library/base/man/labels.Rd
index 30cdfe6..2c64885 100644
--- a/src/library/base/man/labels.Rd
+++ b/src/library/base/man/labels.Rd
@@ -21,7 +21,7 @@ labels(object, \dots)
\value{
A character vector or list of such vectors. For a vector the results
is the names or \code{seq_along(x)} and for a data frame or array it
- is the dimnames (with \code{NULL} expanded to \code{seq_len(d[i])}.
+ is the dimnames (with \code{NULL} expanded to \code{seq_len(d[i])}).
}
\references{
Chambers, J. M. and Hastie, T. J. (1992)
diff --git a/src/library/base/man/library.Rd b/src/library/base/man/library.Rd
index e3506ff..00c7e5e 100644
--- a/src/library/base/man/library.Rd
+++ b/src/library/base/man/library.Rd
@@ -30,7 +30,7 @@ require(package, lib.loc = NULL, quietly = FALSE,
\item{package, help}{the name of a package, given as a \link{name} or
literal character string, or a character string, depending on
whether \code{character.only} is \code{FALSE} (default) or
- \code{TRUE}).}
+ \code{TRUE}.}
\item{pos}{the position on the search list at which to attach the
loaded namespace. Can also be the name of a position on the current
search list as given by \code{\link{search}()}.}
diff --git a/src/library/base/man/locales.Rd b/src/library/base/man/locales.Rd
index 2531759..c506782 100644
--- a/src/library/base/man/locales.Rd
+++ b/src/library/base/man/locales.Rd
@@ -73,7 +73,7 @@ Sys.setlocale(category = "LC_ALL", locale = "")
on most \R platforms.
On platforms where ICU is used for collation the locale used for
- collation can be reset by \code{\link{icuSetCollate}}). Except on
+ collation can be reset by \code{\link{icuSetCollate}}. Except on
Windows, the initial setting is taken from the \code{"LC_COLLATE"}
category, and it is reset when this is changed by a call to
\code{Sys.setlocale}.
diff --git a/src/library/base/man/matrix.Rd b/src/library/base/man/matrix.Rd
index baf105e..4ee97ce 100644
--- a/src/library/base/man/matrix.Rd
+++ b/src/library/base/man/matrix.Rd
@@ -58,7 +58,7 @@ is.matrix(x)
vectors (\code{0} for raw vectors) and \code{NULL} for lists.
\code{is.matrix} returns \code{TRUE} if \code{x} is a vector and has a
- \code{"\link{dim}"} attribute of length 2) and \code{FALSE} otherwise.
+ \code{"\link{dim}"} attribute of length 2 and \code{FALSE} otherwise.
Note that a \code{\link{data.frame}} is \strong{not} a matrix by this
test. The function is generic: you can write methods to handle
specific classes of objects, see \link{InternalMethods}.
diff --git a/src/library/base/man/merge.Rd b/src/library/base/man/merge.Rd
index 515fbed..9c90025 100644
--- a/src/library/base/man/merge.Rd
+++ b/src/library/base/man/merge.Rd
@@ -88,7 +88,7 @@ merge(x, y, \dots)
gives a \emph{natural join}, a special case of an \emph{inner
join}. Specifying \code{all.x = TRUE} gives a \emph{left (outer)
join}, \code{all.y = TRUE} a \emph{right (outer) join}, and both
- (\code{all = TRUE} a \emph{(full) outer join}. DBMSes do not match
+ (\code{all = TRUE}) a \emph{(full) outer join}. DBMSes do not match
\code{NULL} records, equivalent to \code{incomparables = NA} in \R.
}
diff --git a/src/library/base/man/ns-load.Rd b/src/library/base/man/ns-load.Rd
index 32516ec..bddc592 100644
--- a/src/library/base/man/ns-load.Rd
+++ b/src/library/base/man/ns-load.Rd
@@ -39,7 +39,7 @@ isNamespaceLoaded(name)
}
\item{partial}{logical; if true, stop just after loading code.}
\item{versionCheck}{\code{NULL} or a version specification (a list
- with components \code{op} and \code{version})).}
+ with components \code{op} and \code{version}).}
\item{quietly}{logical: should progress and error messages be suppressed?}
\item{name}{string or \sQuote{name}, see \code{\link{as.symbol}},
of a package, e.g., \code{"stats"}.}
diff --git a/src/library/base/man/paste.Rd b/src/library/base/man/paste.Rd
index 72aac0c..169de5e 100644
--- a/src/library/base/man/paste.Rd
+++ b/src/library/base/man/paste.Rd
@@ -48,7 +48,7 @@ paste0(\dots, collapse = NULL)
which case it is a single empty string.
If any input into an element of the result is in UTF-8 (and none are
- declared with encoding \code{"bytes"}, (see \code{\link{Encoding}}),
+ declared with encoding \code{"bytes"}, see \code{\link{Encoding}}),
that element will be in UTF-8, otherwise in the current encoding in
which case the encoding of the element is declared if the current
locale is either Latin-1 or UTF-8, at least one of the corresponding
diff --git a/src/library/base/man/readLines.Rd b/src/library/base/man/readLines.Rd
index 77429f0..4982805 100644
--- a/src/library/base/man/readLines.Rd
+++ b/src/library/base/man/readLines.Rd
@@ -53,7 +53,7 @@ readLines(con = stdin(), n = -1L, ok = TRUE, warn = TRUE,
Embedded nuls in the input stream will terminate the line currently
being read, with a warning (unless \code{skipNul = TRUE} or \code{warn
- = FALSE)}).
+ = FALSE}).
If \code{con} is a not-already-open \link{connection} with a non-default
\code{encoding} argument, the text is converted to UTF-8 and declared
diff --git a/src/library/base/man/regex.Rd b/src/library/base/man/regex.Rd
index 839e1e6..b2701e3 100644
--- a/src/library/base/man/regex.Rd
+++ b/src/library/base/man/regex.Rd
@@ -20,7 +20,7 @@
strings. Two types of regular expressions are used in \R,
\emph{extended} regular expressions (the default) and
\emph{Perl-like} regular expressions used by \code{perl = TRUE}.
- There is a also \code{fixed = TRUE} which can be considered to use a
+ There is also \code{fixed = TRUE} which can be considered to use a
\emph{literal} regular expression.
Other functions which use regular expressions (often via the use of
@@ -37,7 +37,7 @@
}
\section{Extended Regular Expressions}{
This section covers the regular expressions allowed in the default
- mode of \code{grep}, \code{grep}, \code{regexpr}, \code{gregexpr},
+ mode of \code{grep}, \code{grepl}, \code{regexpr}, \code{gregexpr},
\code{sub}, \code{gsub}, \code{regexec} and \code{strsplit}. They use
an implementation of the POSIX 1003.2 standard: that allows some scope
for interpretation and the interpretations here are those currently
@@ -206,7 +206,7 @@
For complete details please consult the man pages for PCRE (and not
PCRE2), especially \command{man pcrepattern} and \command{man
- pcreapi}), on your system or from the sources at
+ pcreapi}, on your system or from the sources at
\url{http://www.pcre.org}. (The version in use can be found by
calling \code{\link{extSoftVersion}}. It need not be the version
described in the system's man page. As PCRE has been feature-frozen
@@ -336,7 +336,7 @@
\code{\link{ls}} and \code{\link{strsplit}}.
The TRE documentation at
- \url{http://laurikari.net/tre/documentation/regex-syntax/}).
+ \url{http://laurikari.net/tre/documentation/regex-syntax/}.
The POSIX 1003.2 standard at
\url{http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html}
diff --git a/src/library/base/man/seq.POSIXt.Rd b/src/library/base/man/seq.POSIXt.Rd
index c69f23e..2016325 100644
--- a/src/library/base/man/seq.POSIXt.Rd
+++ b/src/library/base/man/seq.POSIXt.Rd
@@ -33,9 +33,9 @@
}
The difference between \code{"day"} and \code{"DSTday"} is that the
former ignores changes to/from daylight savings time and the latter takes
- the same clock time each day. (\code{"week"} ignores DST (it is a
- period of 144 hours), but \code{"7 DSTdays"}) can be used as an
- alternative. \code{"month"} and \code{"year"} allow for DST.)
+ the same clock time each day. \code{"week"} ignores DST (it is a
+ period of 144 hours), but \code{"7 DSTdays"} can be used as an
+ alternative. \code{"month"} and \code{"year"} allow for DST.
The \link{time zone} of the result is taken from \code{from}: remember
that GMT means UTC (and not the time zone of Greenwich, England) and so
diff --git a/src/library/base/man/source.Rd b/src/library/base/man/source.Rd
index f3fb812..ad5bbb9 100644
--- a/src/library/base/man/source.Rd
+++ b/src/library/base/man/source.Rd
@@ -154,7 +154,7 @@ withAutoprint(exprs, evaluated = FALSE, local = parent.frame(),
in the result will be translated to the current encoding and marked as
such (see \code{\link{Encoding}}).
- If \code{file} is a connection (including one specified by \code{""},
+ If \code{file} is a connection (including one specified by \code{""}),
it is not possible to re-encode the input inside \code{source}, and so
the \code{encoding} argument is just used to mark character strings in the
parsed input in Latin-1 and UTF-8 locales: see \code{\link{parse}}.
@@ -178,7 +178,7 @@ withAutoprint(exprs, evaluated = FALSE, local = parent.frame(),
\examples{
someCond <- 7 > 6
## want an if-clause to behave "as top level" wrt auto-printing :
-## (all should look "as if on top level", e.g. non-assignments should print:
+## (all should look "as if on top level", e.g. non-assignments should print:)
if(someCond) withAutoprint({
x <- 1:12
x-1
diff --git a/src/library/base/man/substr.Rd b/src/library/base/man/substr.Rd
index 180d632..9061579 100644
--- a/src/library/base/man/substr.Rd
+++ b/src/library/base/man/substr.Rd
@@ -46,7 +46,7 @@ substring(text, first, last = 1000000L) <- value
the answer is \code{NA}.
Elements of the result will be have the encoding declared as that of
- the current locale (see \code{\link{Encoding}} if the corresponding
+ the current locale (see \code{\link{Encoding}}) if the corresponding
input had a declared Latin-1 or UTF-8 encoding and the current locale
is either Latin-1 or UTF-8.
diff --git a/src/library/base/man/system.Rd b/src/library/base/man/system.Rd
index b687112..2b4d242 100644
--- a/src/library/base/man/system.Rd
+++ b/src/library/base/man/system.Rd
@@ -64,7 +64,7 @@ system(command, intern = FALSE,
\code{command} must be an executable (extensions \file{.exe},
\file{.com}) or a batch file (extensions \file{.cmd} and \file{.bat}):
- these extensions are tried in turn if none is supplied.) This means
+ these extensions are tried in turn if none is supplied. This means
that redirection, pipes, DOS internal commands, \dots cannot be used:
see \code{\link{shell}} if you want to pass a shell command-line.
diff --git a/src/library/base/man/timezones.Rd b/src/library/base/man/timezones.Rd
index 027fcf2..56ead18 100644
--- a/src/library/base/man/timezones.Rd
+++ b/src/library/base/man/timezones.Rd
@@ -1,6 +1,6 @@
% File src/library/base/man/timezones.Rd
% Part of the R package, https://www.R-project.org
-% Copyright 1995-2016 R Core Team
+% Copyright 1995-2017 R Core Team
% Distributed under GPL 2 or later
\name{timezones}
@@ -28,40 +28,47 @@ OlsonNames()
\arguments{
\item{location}{logical: should an attempt be made to find the
location name as used in the Olson/IANA database?
- (See \sQuote{Time zone names} below.)}
+ (See \sQuote{Time zone names} below.)
+
+ \code{location = FALSE} is deprecated.
+ }
}
\details{
Time zones are a system-specific topic, but these days almost all \R
platforms use similar underlying code, used by Linux, macOS, Solaris,
- AIX, FreeBSD, Sun Java >= 1.4 and Tcl >= 8.5, and installed with \R on
- Windows. Unfortunately there are many system-specific errors in the
- implementations. It is possible to use \R's own version of the code
- on Unix-alikes as well as on Windows: this is the default for macOS and
- recommended for Solaris.
+ AIX and FreeBSD, and installed with \R on Windows. (Unfortunately
+ there are many system-specific errors in the implementations.) It is
+ possible to use the \R sources' version of the code on Unix-alikes as
+ well as on Windows: this is the default for macOS and recommended for
+ Solaris.
- It should be possible to set the time zone via the environment
+ It should be possible to set the current time zone via the environment
variable \env{TZ}: see the section on \sQuote{Time zone names} for
suitable values. \code{Sys.timezone()} will return the value of
\env{TZ} if set (and on some OSes it is always set), otherwise it will
- try to retrieve a value which if set for \env{TZ} would give the
- current time zone. This is not in general possible, and
- \code{Sys.timezone(FALSE)} on Windows will retrieve the abbreviation
- used for the current time.
+ try to retrieve from the OS a value which if set for \env{TZ} would
+ select the system's idea of the time zone. This is not in general
+ possible, and \code{Sys.timezone(FALSE)} on Windows will retrieve the
+ abbreviation used for the current time.
- If \env{TZ} is set but empty or invalid, most platforms default to
- \samp{UTC}, the time zone colloquially known as \samp{GMT} (see
- \url{https://en.wikipedia.org/wiki/Coordinated_Universal_Time}). (Some
- but not all platforms will give a warning for invalid time zones.)
+ %% glibc silently uses UTC but uses the invalid name as the
+ %% abbreviations. tzcode as used by R warns and uses UTC.
+ If \env{TZ} is set but invalid, most platforms default to \samp{UTC},
+ the time zone colloquially known as \samp{GMT} (see
+ \url{https://en.wikipedia.org/wiki/Coordinated_Universal_Time}).
+ (Some but not all platforms will give a warning for invalid values.)
+ If it is unset or empty the \emph{system} time zone is used.
Time zones did not come into use until the second half of the
nineteenth century and were not widely adopted until the twentieth,
and \emph{daylight saving time} (DST, also known as \emph{summer
time}) was first introduced in the early twentieth century, most
- widely in 1916. Over the last 100 years places have changed their
+ widely in 1916. Over the last 100 years places have changed their
affiliation between major time zones, have opted out of (or in to) DST
- in various years or adopted DST rule changes late or not at all.
-
+ in various years or adopted DST rule changes late or not at all. (The
+ UK experimented with DST throughout 1971, only.)
+
A quite common system implementation of \code{POSIXct} is as signed
32-bit integers and so only goes back to the end of 1901: on such
systems \R assumes that dates prior to that are in the same time zone
@@ -79,8 +86,16 @@ OlsonNames()
\code{NA} or an empty string (which on some OSes means \samp{UTC}).
For the default \code{location = TRUE} this will be a location such as
\code{"Europe/London"} if one can be ascertained. For \code{location
- = FALSE} this may be an abbreviation such as \code{"EST"} or
- \code{"CEST"} on Windows.
+ = FALSE} it will be an abbreviation such as \code{"EST"} or
+ \code{"CEST"} on Windows but \code{NA} on other platforms
+
+ A time zone region may be known by several names: for example
+ \samp{"Europe/London"} is also known as \samp{GB}, \samp{GB-Eire},
+ \samp{Europe/Belfast}, \samp{Europe/Guernsey},
+ \samp{Europe/Isle_of_Man} and \samp{Europe/Jersey}. A few regions
+ are also known by a summary of their time zone,
+ e.g.\sspace{}\samp{PST8PDT} is an alias for
+ \samp{America/Los_Angeles}.
\code{OlsonNames} returns a character vector.
}
@@ -101,19 +116,20 @@ OlsonNames()
compiled by Arthur David Olson and now managed by IANA, in which the
preferred way to refer to a time zone is by a location (typically of a
city), e.g., \code{Europe/London}, \code{America/Los_Angeles},
- \code{Pacific/Easter}. Some traditional designations are also allowed
- such as \code{EST5EDT} or \code{GB}. (Beware that some of these
- designations may not be what you expect: in particular \code{EST} is a
- time zone used in Canada \emph{without} daylight saving time, and not
- \code{EST5EDT} nor (Australian) Eastern Standard Time.) The
- designation can also be an optional colon prepended to the path to a
- file giving complied zone information (and the examples above are all
- files in a system-specific location). See
- \url{http://www.twinsun.com/tz/tz-link.htm} for more details and
- references. By convention, regions with a unique time-zone history
- since 1970 have specific names in the database, but those with
- different earlier histories may not. Each time zone has one or two
- (the second for DST) \emph{abbreviations} used when formatting times.
+ \code{Pacific/Easter} within a \sQuote{time zone region}. Some
+ traditional designations are also allowed such as \code{EST5EDT} or
+ \code{GB}. (Beware that some of these designations may not be what
+ you expect: in particular \code{EST} is a time zone used in Canada
+ \emph{without} daylight saving time, and not \code{EST5EDT} nor
+ (Australian) Eastern Standard Time.) The designation can also be an
+ optional colon prepended to the path to a file giving complied zone
+ information (and the examples above are all files in a system-specific
+ location). See \url{http://www.twinsun.com/tz/tz-link.htm} for more
+ details and references. By convention, regions with a unique
+ time-zone history since 1970 have specific names in the database, but
+ those with different earlier histories may not. Each time zone has
+ one or two (the second for DST) \emph{abbreviations} used when
+ formatting times.
The abbreviations used have changed over the years: for example France
used \samp{PMT} (\sQuote{Paris Mean Time}) from 1891 to 1911 then
@@ -121,15 +137,20 @@ OlsonNames()
all time zones the abbreviations have been stable since 1970.) The
POSIX standard allows only one or two abbreviations per time zone, so
you may see the current abbreviation(s) used for older times.
-
+
+ For some time zones abbreviations are like \samp{-03} and
+ \samp{+0845}: this is done when there is no official abbreviation.
+ (Negative values are behind (West of) UTC, as for the \code{"\%z"}
+ format for \code{\link{strftime}}.)
+
The function \code{OlsonNames} returns the time-zone names known to
- the Olson/IANA database on the current system. The system-specific
- location in the file system varies, e.g.\sspace{}\file{/usr/share/zoneinfo}
- (Linux, macOS, FreeBSD), \file{/usr/share/lib/zoneinfo} (Solaris, AIX),
- \ldots. It is likely that there is a file named something like
- \file{zone.tab} under that directory listing the locations known as
- time-zone names (but not for example \code{EST5EDT}): this is read by
- \code{OlsonNames}. See also
+ the currently selected Olson/IANA database. The system-specific
+ location in the file system varies,
+ e.g.\sspace{}\file{/usr/share/zoneinfo} (Linux, macOS, FreeBSD),
+ \file{/usr/share/lib/zoneinfo} (Solaris, AIX), \ldots. It is likely
+ that there is a file named something like \file{zone.tab} under that
+ directory listing the locations known as time-zone names (but not for
+ example \code{EST5EDT}). See also
\url{https://en.wikipedia.org/wiki/Zone.tab}.
Where \R was configured with option \option{--with-internal-tzcode}
@@ -137,8 +158,15 @@ OlsonNames()
\code{file.path(R.home("share"), "zoneinfo")} is used by default: file
\file{VERSION} in that directory states the version. Environment
variable \env{TZDIR} can be used to point to a different
- \file{zoneinfo} directory: this is also supported by the native
- services on some OSes, e.g.\sspace{}Linux).
+ \file{zoneinfo} database: this is also supported by the native
+ services on some OSes, e.g.\sspace{}Linux using \code{glibc} except in
+ secure modes.
+ %% But not Linux with musl
+
+ Time zones given by name (\emph{via} environment variable \env{TZ}, in
+ \code{tz} arguments to functions such as \code{\link{as.POSIXlt}} and
+ perhaps the system time zone) are loaded from the currently selected
+ \file{zoneinfo} database.
#ifdef windows
An attempt is made (once only per session) to map Windows' idea of the
@@ -149,12 +177,13 @@ OlsonNames()
before any date-times are used in the session.
#endif
- Most platforms support time zones of the form \samp{GMT+n} and
- \samp{GMT-n}, which assume at a fixed offset from UTC (hence no DST).
- Contrary to some expectations (but consistent with names such as
- \samp{PST8PDT}), negative offsets are times ahead of (east of) UTC,
- positive offsets are times behind (west of) UTC.
-
+ Most platforms support time zones of the form \samp{Etc/GMT+n} and
+ \samp{Etc/GMT-n} (possibly also without prefix \samp{Etc/}), which
+ assume a fixed offset from UTC (hence no DST). Contrary to some
+ expectations (but consistent with names such as \samp{PST8PDT}),
+ negative offsets are times ahead of (east of) UTC, positive offsets
+ are times behind (west of) UTC.
+
Immediately prior to the advent of legislated time zones, most people
used time based on their longitude (or that of a nearby town), known
as \sQuote{Local Mean Time} and abbreviated as \samp{LMT} in the
@@ -165,7 +194,10 @@ OlsonNames()
%% it is a ksh script so could well pop up elsewhere.
Some systems (notably Linux) have a \command{tzselect} command which
- allows the interactive selection of a supported time zone name.
+ allows the interactive selection of a supported time zone name. On
+ systems using \command{systemd} (notably Linux), the OS command
+ \command{timedatectl list-timezones} will list all available time zone
+ names.
}
\section{Warning}{
@@ -214,12 +246,15 @@ OlsonNames()
\url{https://en.wikipedia.org/wiki/Time_zone} and
\url{http://www.twinsun.com/tz/tz-link.htm} for extensive sets of links.
+
+ \url{https://data.iana.org/time-zones/theory.html} for the
+ \sQuote{rules} of the Olson/IANA database.
}
\examples{
Sys.timezone()
-str(OlsonNames()) ## a few hundred names
+str(OlsonNames()) ## around six hundred names
}
\keyword{utilities}
\keyword{chron}
diff --git a/src/library/base/man/toString.Rd b/src/library/base/man/toString.Rd
index 6a9512a..41541b5 100644
--- a/src/library/base/man/toString.Rd
+++ b/src/library/base/man/toString.Rd
@@ -28,7 +28,7 @@ toString(x, \dots)
This is a generic function for which methods can be written: only the
default method is described here. Most methods should honor the
\code{width} argument to specify the maximum display width (as measured
- by \code{\link{nchar}(type = "width")} of the result.
+ by \code{\link{nchar}(type = "width")}) of the result.
The default method first converts \code{x} to character and then
concatenates the elements separated by \code{", "}.
diff --git a/src/library/base/man/trace.Rd b/src/library/base/man/trace.Rd
index 546dd2c..a6d5652 100644
--- a/src/library/base/man/trace.Rd
+++ b/src/library/base/man/trace.Rd
@@ -1,6 +1,6 @@
% File src/library/base/man/trace.Rd
% Part of the R package, https://www.R-project.org
-% Copyright (C) 1995-2015 R Core Team
+% Copyright (C) 1995-2018 R Core Team
% Distributed under GPL 2 or later
\name{trace}
@@ -29,10 +29,12 @@ tracingState(on = NULL)
returnValue(default = NULL)
}
\arguments{
- \item{what}{The name (quoted or not) of a function to be traced or
- untraced. For \code{untrace} or for \code{trace} with more than one
- argument, more than one name can be given in the quoted form, and
- the same action will be applied to each one.}
+ \item{what}{the name, possibly \code{\link{quote}()}d, of a function
+ to be traced or untraced. For \code{untrace} or for \code{trace}
+ with more than one argument, more than one name can be given in the
+ quoted form, and the same action will be applied to each one. For
+ \dQuote{hidden} functions such as S3 methods in a namespace,
+ \code{where = *} typically needs to be specified as well.}
\item{tracer}{either a \link{function} or an unevaluated expression. The
function will be called or the expression will be evaluated either
at the beginning of the call, or before those steps in the call
@@ -63,18 +65,19 @@ returnValue(default = NULL)
traced; by default, the top-level environment of the call to
\code{trace}.
- An important use of this argument is to trace a function when it
- is called from a package with a namespace. The current namespace mechanism
- imports the functions to be called (with the exception of functions
- in the base package). The functions being called are \emph{not} the
- same objects seen from the top-level (in general, the imported
- packages may not even be attached). Therefore, you must ensure that
- the correct versions are being traced. The way to do this is to set
- argument \code{where} to a function in the namespace. The tracing
- computations will then start looking in the environment of that
- function (which will be the namespace of the corresponding package).
- (Yes, it's subtle, but the semantics here are central to how
- namespaces work in R.)
+ An important use of this argument is to trace functions from a
+ package which are \dQuote{hidden} or called from another package.
+ The namespace mechanism imports the functions to be called (with the
+ exception of functions in the base package). The functions being
+ called are \emph{not} the same objects seen from the top-level (in
+ general, the imported packages may not even be attached).
+ Therefore, you must ensure that the correct versions are being
+ traced. The way to do this is to set argument \code{where} to a
+ function in the namespace (or that namespace). The tracing
+ computations will then start looking in the environment of that
+ function (which will be the namespace of the corresponding package).
+ (Yes, it's subtle, but the semantics here are central to how
+ namespaces work in \R.)
}
\item{on}{logical; a call to the support function \code{tracingState} returns \code{TRUE}
if tracing is globally turned on, \code{FALSE} otherwise. An
@@ -85,7 +88,7 @@ returnValue(default = NULL)
\item{expr, msg}{arguments to the support function \code{.doTrace}, calls to
which are inserted into the modified function or method:
\code{expr} is the tracing action (such as a call to
- \code{browser()}, and \code{msg} is a string identifying the
+ \code{browser()}), and \code{msg} is a string identifying the
place where the trace action occurs.
}
\item{default}{If \code{returnValue} finds no return value (e.g.
@@ -124,7 +127,7 @@ returnValue(default = NULL)
When the \code{at} argument is supplied, it can be a vector of
integers referring to the substeps of the body of the function (this
- only works if the body of the function is enclosed in \code{{ ...}}. In
+ only works if the body of the function is enclosed in \code{{ ...}}). In
this case \code{tracer} is \emph{not} called on entry, but instead
just before evaluating each of the steps listed in \code{at}. (Hint:
you don't want to try to count the steps in the printed version of a
@@ -182,7 +185,7 @@ returnValue(default = NULL)
the global environment, are not saved in the image, so tracing expires
with the session for such functions.
- Tracing a method is basically just like tracing a function, with the
+ Tracing an S4 method is basically just like tracing a function, with the
exception that the traced version is stored by a call to
\code{\link{setMethod}} rather than by direct assignment, and so is
the untraced version after a call to \code{untrace}.
@@ -292,11 +295,26 @@ trace("f", quote(browser(skipCalls = 4)), at = list(c(3,4)))
trace("as.matrix", recover)
-
## turn off the tracing
untrace(c("f", "as.matrix"))
+##-------- Tracing hidden functions : need 'where = *'
+##
+## 'where' can be a function whose environment is meant:
+trace(quote(ar.yw.default), where = ar)
+a <- ar(rnorm(100)) # "Tracing ..."
+untrace(quote(ar.yw.default), where = ar)
+
+## trace() more than one function simultaneously:
+## expression(E1, E2, ...) here is equivalent to
+## c(quote(E1), quote(E2), quote(.*), ..)
+trace(expression(ar.yw, ar.yw.default), where = ar)
+a <- ar(rnorm(100)) # --> 2 x "Tracing ..."
+# and turn it off:
+untrace(expression(ar.yw, ar.yw.default), where = ar)
+
+
\dontrun{
## trace calls to the function lm() that come from
## the nlme package.
diff --git a/src/library/datasets/man/ToothGrowth.Rd b/src/library/datasets/man/ToothGrowth.Rd
index 2e1a044..7e33aab 100644
--- a/src/library/datasets/man/ToothGrowth.Rd
+++ b/src/library/datasets/man/ToothGrowth.Rd
@@ -11,7 +11,7 @@
The response is the length of odontoblasts (cells responsible for
tooth growth) in 60 guinea pigs. Each animal received one of three
dose levels of vitamin C (0.5, 1, and 2 mg/day) by one of two delivery
- methods, (orange juice or ascorbic acid (a form of vitamin C and coded
+ methods, orange juice or ascorbic acid (a form of vitamin C and coded
as \code{VC}).
}
\usage{ToothGrowth}
diff --git a/src/library/grDevices/man/colorRamp.Rd b/src/library/grDevices/man/colorRamp.Rd
index 7304105..590e4f8 100644
--- a/src/library/grDevices/man/colorRamp.Rd
+++ b/src/library/grDevices/man/colorRamp.Rd
@@ -50,7 +50,7 @@ colorRampPalette(colors, \dots)
\code{colorRampPalette} returns a function that takes an integer
argument (the required number of colors) and returns a character
vector of colors (see \code{\link{rgb}}) interpolating the given sequence
- (similar to \code{\link{heat.colors}} or \code{\link{terrain.colors}}.
+ (similar to \code{\link{heat.colors}} or \code{\link{terrain.colors}}).
}
\seealso{
diff --git a/src/library/grDevices/man/dev.Rd b/src/library/grDevices/man/dev.Rd
index 24f01d0..1ae8a5b 100644
--- a/src/library/grDevices/man/dev.Rd
+++ b/src/library/grDevices/man/dev.Rd
@@ -39,7 +39,7 @@ graphics.off()
which all graphics operations occur. There is a \code{"null device"}
which is always open but is really a placeholder: any attempt to use
it will open a new device specified by
- \code{\link{getOption}("device")}).
+ \code{\link{getOption}("device")}.
Devices are associated with a name (e.g., \code{"X11"} or
\code{"postscript"}) and a number in the range 1 to 63; the
diff --git a/src/library/grDevices/man/grSoftVersion.Rd b/src/library/grDevices/man/grSoftVersion.Rd
index 9b797eb..a7b0da7 100644
--- a/src/library/grDevices/man/grSoftVersion.Rd
+++ b/src/library/grDevices/man/grSoftVersion.Rd
@@ -1,6 +1,6 @@
% File src/library/grDevices/man/grSoftVersion.Rd
% Part of the R package, https://www.R-project.org
-% Copyright 2014 R Core Team
+% Copyright 2014-2017 R Core Team
% Distributed under GPL 2 or later
\name{grSoftVersion}
@@ -13,31 +13,38 @@
grSoftVersion()
}
\value{
- A named character vector containing at least the element
+ A named character vector containing at least the elements
\item{cairo}{the version of cairographics in use, or \code{""} if
cairographics is not available.}
- It may also contain the versions of third-party software used
- by the
+ It may also contain the versions of third-party software used by the
#ifdef windows
standard
#endif
#ifdef unix
X11-based
#endif
- (not cairo-based) bitmap devices:
+ bitmap devices:
\item{libpng}{the version of \code{libpng} in use, or \code{""} if
not available.}
\item{jpeg}{the version of the JPEG headers used for compilation,
or \code{""} if JPEG support was not compiled in.}
\item{libtiff}{the version of \code{libtiff} in use, or \code{""} if
not available.}
-
+
+ It is conceivable but unlikely that the cairo-based bitmap devices
+ will use different versions linked \emph{via} cairographics,
+ especially \code{png(type = "cairo-png")}.
+#ifdef unix
+ If available on macOS, the Quartz-based devices will use the system
+ versions of these libraries rather than those reported here.
+#endif
+
Unless otherwise stated the reported version is that of the (possibly
dynamically-linked) library in use at runtime.
- Note that \code{libjpeg-turbo} used on some Linux distributions
+ Note that \code{libjpeg-turbo} as used on some Linux distributions
reports its version as \code{"6.2"}, the IJG version from which it forked.
}
diff --git a/src/library/grDevices/man/postscript.Rd b/src/library/grDevices/man/postscript.Rd
index 01708ce..57af5e5 100644
--- a/src/library/grDevices/man/postscript.Rd
+++ b/src/library/grDevices/man/postscript.Rd
@@ -310,7 +310,7 @@ postscript(file = if(onefile) "Rplots.ps" else "Rplot\%03d.ps",
(\url{https://en.wikipedia.org/wiki/CMYK_color_model#Mapping_RGB_to_CMYK}),
and raster images are output in RGB.
- Color models provided for backwards compatibility are \code{"rgb"})
+ Color models provided for backwards compatibility are \code{"rgb"}
(which is RGB+gray) and \code{"rgb-nogray"} which use uncalibrated RGB
(as used in \R prior to 2.13.0). These result in slightly smaller
files which may render faster, but do rely on the viewer being
diff --git a/src/library/grDevices/man/unix/savePlot.Rd b/src/library/grDevices/man/unix/savePlot.Rd
index 3653fba..2b2cd86 100644
--- a/src/library/grDevices/man/unix/savePlot.Rd
+++ b/src/library/grDevices/man/unix/savePlot.Rd
@@ -1,6 +1,6 @@
% File src/library/grDevices/man/windows/savePlot.Rd
% Part of the R package, https://www.R-project.org
-% Copyright 2008-9 R Core Team
+% Copyright 2008-2018 R Core Team
% Distributed under GPL 2 or later
\name{savePlot}
@@ -16,8 +16,7 @@ savePlot(filename = paste("Rplot", type, sep = "."),
}
\arguments{
\item{filename}{filename to save to.}
- \item{type}{file type: only \code{"png"} will be accepted for cairo
- version 1.0.}
+ \item{type}{file type.}
\item{device}{the device to save from.}
}
\details{
@@ -30,9 +29,9 @@ savePlot(filename = paste("Rplot", type, sep = "."),
For devices with buffering this copies the buffer's image surface, so
works even if \code{\link{dev.hold}} has been called.
- At present the plot is saved after rendering onto the canvas (default
- opaque white), so for the default \code{bg = "transparent"} the
- effective background colour is the canvas colour.
+ The plot is saved after rendering onto the canvas (default opaque
+ white), so for the default \code{bg = "transparent"} the effective
+ background colour is the canvas colour.
}
\value{
Invisible \code{NULL}.
@@ -40,7 +39,8 @@ savePlot(filename = paste("Rplot", type, sep = "."),
\note{
There is a similar function of the same name but more types for
- \code{windows} devices on Windows.
+ \code{windows} devices on Windows: that has an additional argument
+ \code{restoreConsole} which is only supported on Windows.
}
\seealso{
diff --git a/src/library/grDevices/man/unix/x11.Rd b/src/library/grDevices/man/unix/x11.Rd
index 9bcd1bc..40ef155 100644
--- a/src/library/grDevices/man/unix/x11.Rd
+++ b/src/library/grDevices/man/unix/x11.Rd
@@ -216,7 +216,7 @@ X11.options(\dots, reset = FALSE)
% https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/551977
Problems with incorrect rendering of symbols (e.g., of
- \code{quote(pi)} and \code{expression(10^degree))})
+ \code{quote(pi)} and \code{expression(10^degree)})
have been seen on Linux systems which have the Wine
symbol font installed -- \code{fontconfig} then prefers this and
misinterprets its encoding. Adding the following lines
diff --git a/src/library/grDevices/man/windows/savePlot.Rd b/src/library/grDevices/man/windows/savePlot.Rd
index e91cc98..cc526a6 100644
--- a/src/library/grDevices/man/windows/savePlot.Rd
+++ b/src/library/grDevices/man/windows/savePlot.Rd
@@ -1,6 +1,6 @@
% File src/library/grDevices/man/windows/savePlot.Rd
% Part of the R package, https://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Copyright 1995-2018 R Core Team
% Distributed under GPL 2 or later
\name{savePlot}
@@ -15,13 +15,14 @@ savePlot(filename = "Rplot",
}
\arguments{
\item{filename}{The filename under which to save the plot.
- Tilde-expansion (see \code{\link{path.expand}} is supported.}
+ Tilde-expansion (see \code{\link{path.expand}}) is supported.}
\item{type}{The type of plot, Windows metafile, PNG, JPEG, BMP
(Windows bitmap format), TIFF, PostScript or PDF.}
\item{device}{A device number of a \code{windows} device, by default
the current device.}
\item{restoreConsole}{See the \sQuote{Details} section
- of \code{\link{windows}}.}
+ of \code{\link{windows}}. Do not use this in programming without
+ first checking that the platform is Windows.}
}
\description{
Saves the current plot on a \code{windows} device to a file.
@@ -52,7 +53,8 @@ savePlot(filename = "Rplot",
\note{
There is a similar function of the same name but fewer types for
- cairo-based \code{X11} devices on Unix-alikes
+ cairo-based \code{X11} devices on Unix-alikes, and without the
+ \code{restoreConsole} argument.
}
\seealso{
diff --git a/src/library/grDevices/man/windows/windows.options.Rd b/src/library/grDevices/man/windows/windows.options.Rd
index e8db00d..cc59c79 100644
--- a/src/library/grDevices/man/windows/windows.options.Rd
+++ b/src/library/grDevices/man/windows/windows.options.Rd
@@ -33,7 +33,7 @@ windows.options(\dots, reset = FALSE)
values are applied.
Option \code{antialias} applies to screen devices (\code{windows},
- \code{win.graph}, \code{X11} and \code{x11})). There is a separate option,
+ \code{win.graph}, \code{X11} and \code{x11}). There is a separate option,
\code{bitmap.aa.win}, for bitmap devices with \code{type = "windows"}.
}
\value{
diff --git a/src/library/grDevices/tests/ps-tests.Rout.save b/src/library/grDevices/tests/ps-tests.Rout.save
index 24eefa4..4ba6cd2 100644
--- a/src/library/grDevices/tests/ps-tests.Rout.save
+++ b/src/library/grDevices/tests/ps-tests.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -95,4 +95,4 @@ null device
>
> proc.time()
user system elapsed
- 0.550 0.040 0.572
+ 0.530 0.032 0.547
diff --git a/src/library/grDevices/tests/xfig-tests.Rout.save b/src/library/grDevices/tests/xfig-tests.Rout.save
index 6e436ad..2e97af6 100644
--- a/src/library/grDevices/tests/xfig-tests.Rout.save
+++ b/src/library/grDevices/tests/xfig-tests.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -102,4 +102,4 @@ Type 'q()' to quit R.
>
> proc.time()
user system elapsed
- 0.224 0.036 0.240
+ 0.190 0.033 0.202
diff --git a/src/library/graphics/man/mosaicplot.Rd b/src/library/graphics/man/mosaicplot.Rd
index 30a2544..90ab4bb 100644
--- a/src/library/graphics/man/mosaicplot.Rd
+++ b/src/library/graphics/man/mosaicplot.Rd
@@ -38,7 +38,7 @@ mosaicplot(x, \dots)
\item{off}{vector of offsets to determine percentage spacing at each
level of the mosaic (appropriate values are between 0 and 20,
and the default is 20 times the number of splits for 2-dimensional
- tables, and 10 otherwise. Rescaled to maximally 50, and recycled if
+ tables, and 10 otherwise). Rescaled to maximally 50, and recycled if
necessary.}
\item{dir}{vector of split directions (\code{"v"} for vertical and
\code{"h"} for horizontal) for each level of the mosaic, one
diff --git a/src/library/graphics/man/plot.dataframe.Rd b/src/library/graphics/man/plot.dataframe.Rd
index 87962b7..bdc3fa5 100644
--- a/src/library/graphics/man/plot.dataframe.Rd
+++ b/src/library/graphics/man/plot.dataframe.Rd
@@ -22,7 +22,7 @@
This is intended for data frames with \emph{numeric} columns. For more
than two columns it first calls \code{\link{data.matrix}} to convert
the data frame to a numeric matrix and then calls \code{\link{pairs}}
- to produce a scatterplot matrix). This can fail and may well be
+ to produce a scatterplot matrix. This can fail and may well be
inappropriate: for example numerical conversion of dates will lose
their special meaning and a warning will be given.
diff --git a/src/library/graphics/man/plot.raster.Rd b/src/library/graphics/man/plot.raster.Rd
index 9ece703..296212d 100644
--- a/src/library/graphics/man/plot.raster.Rd
+++ b/src/library/graphics/man/plot.raster.Rd
@@ -15,9 +15,9 @@
\arguments{
\item{x, y}{raster. \code{y} will be ignored.}
\item{xlim, ylim}{Limits on the plot region (default from dimensions
- of the raster.}
+ of the raster).}
\item{xaxs, yaxs}{Axis interval calculation style (default means that
- raster fills plot region.}
+ raster fills plot region).}
\item{asp}{Aspect ratio (default retains aspect ratio of the raster).}
\item{add}{Logical indicating whether to simply add raster to an
existing plot.}
diff --git a/src/library/graphics/man/rasterImage.Rd b/src/library/graphics/man/rasterImage.Rd
index 8b6b040..64feb53 100644
--- a/src/library/graphics/man/rasterImage.Rd
+++ b/src/library/graphics/man/rasterImage.Rd
@@ -36,7 +36,7 @@ rasterImage(image,
Plotting raster images is not supported on all devices and may have
limitations where supported, for example (e.g., for \code{postscript}
- and \code{X11(type = "Xlib")}) is restricted to opaque colors).
+ and \code{X11(type = "Xlib")} is restricted to opaque colors).
Problems with the rendering of raster images have been reported by
users of \code{windows()} devices under Remote Desktop, at least under
its default settings.
diff --git a/src/library/graphics/man/rect.Rd b/src/library/graphics/man/rect.Rd
index fa024cb..8166e10 100644
--- a/src/library/graphics/man/rect.Rd
+++ b/src/library/graphics/man/rect.Rd
@@ -74,7 +74,7 @@ j <- 10*(0:5)
rect(125+j, 360+j, 141+j, 405+j/2, col = c(NA,0),
border = "gold", lwd = 2)
rect(125+j, 296+j/2, 141+j, 331+j/5, col = c(NA,"midnightblue"))
-mtext("+ 2 x 6 rect(*, col = c(NA,0)) and col = c(NA,\"m..blue\"))")
+mtext("+ 2 x 6 rect(*, col = c(NA,0)) and col = c(NA,\"m..blue\")")
## an example showing colouring and shading
plot(c(100, 200), c(300, 450), type= "n", xlab = "", ylab = "")
diff --git a/src/library/grid/inst/doc/displaylist.pdf b/src/library/grid/inst/doc/displaylist.pdf
index 989c2c0..51909f5 100644
--- a/src/library/grid/inst/doc/displaylist.pdf
+++ b/src/library/grid/inst/doc/displaylist.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/frame.pdf b/src/library/grid/inst/doc/frame.pdf
index 971680d..60b524e 100644
--- a/src/library/grid/inst/doc/frame.pdf
+++ b/src/library/grid/inst/doc/frame.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/grid.pdf b/src/library/grid/inst/doc/grid.pdf
index 8a5d2c6..34660d5 100644
--- a/src/library/grid/inst/doc/grid.pdf
+++ b/src/library/grid/inst/doc/grid.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/grobs.pdf b/src/library/grid/inst/doc/grobs.pdf
index a0c033c..e813b52 100644
--- a/src/library/grid/inst/doc/grobs.pdf
+++ b/src/library/grid/inst/doc/grobs.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/interactive.pdf b/src/library/grid/inst/doc/interactive.pdf
index de1efc8..219bc5e 100644
--- a/src/library/grid/inst/doc/interactive.pdf
+++ b/src/library/grid/inst/doc/interactive.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/locndimn.pdf b/src/library/grid/inst/doc/locndimn.pdf
index e8fcbc7..e377a36 100644
--- a/src/library/grid/inst/doc/locndimn.pdf
+++ b/src/library/grid/inst/doc/locndimn.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/moveline.pdf b/src/library/grid/inst/doc/moveline.pdf
index da233b0..ba59821 100644
--- a/src/library/grid/inst/doc/moveline.pdf
+++ b/src/library/grid/inst/doc/moveline.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/nonfinite.pdf b/src/library/grid/inst/doc/nonfinite.pdf
index 1087f3b..dd9fb64 100644
--- a/src/library/grid/inst/doc/nonfinite.pdf
+++ b/src/library/grid/inst/doc/nonfinite.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/plotexample.pdf b/src/library/grid/inst/doc/plotexample.pdf
index 94c5dc0..d4b4589 100644
--- a/src/library/grid/inst/doc/plotexample.pdf
+++ b/src/library/grid/inst/doc/plotexample.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/rotated.pdf b/src/library/grid/inst/doc/rotated.pdf
index 38aad9d..0ac45a3 100644
--- a/src/library/grid/inst/doc/rotated.pdf
+++ b/src/library/grid/inst/doc/rotated.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/saveload.pdf b/src/library/grid/inst/doc/saveload.pdf
index ff9c099..5490967 100644
--- a/src/library/grid/inst/doc/saveload.pdf
+++ b/src/library/grid/inst/doc/saveload.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/sharing.pdf b/src/library/grid/inst/doc/sharing.pdf
index a97c8aa..3546361 100644
--- a/src/library/grid/inst/doc/sharing.pdf
+++ b/src/library/grid/inst/doc/sharing.pdf
Binary files differ
diff --git a/src/library/grid/inst/doc/viewports.pdf b/src/library/grid/inst/doc/viewports.pdf
index 56cc201..4f1b2fe 100644
--- a/src/library/grid/inst/doc/viewports.pdf
+++ b/src/library/grid/inst/doc/viewports.pdf
Binary files differ
diff --git a/src/library/grid/man/drawDetails.Rd b/src/library/grid/man/drawDetails.Rd
index ef06570..81bd335 100644
--- a/src/library/grid/man/drawDetails.Rd
+++ b/src/library/grid/man/drawDetails.Rd
@@ -36,7 +36,7 @@ postDrawDetails(x)
\code{drawDetails} is called next and is where any additional
calculations and graphical output should occur (see, for example,
- \code{grid:::drawDetails.xaxis}. Note that the default behaviour
+ \code{grid:::drawDetails.xaxis}). Note that the default behaviour
for gTrees is to draw all grobs in the \code{children} slot
so there is typically nothing to do here.
diff --git a/src/library/grid/man/grid.convert.Rd b/src/library/grid/man/grid.convert.Rd
index 10946ff..ac75cf7 100644
--- a/src/library/grid/man/grid.convert.Rd
+++ b/src/library/grid/man/grid.convert.Rd
@@ -76,7 +76,7 @@ convertUnit(x, unitTo,
If the device is resized then at least some conversions will
become invalid. For example, suppose that I create a unit
object as follows: \code{oneinch <- convertUnit(unit(1, "inches"),
- "native"}. Now if I resize the device, the unit object in
+ "native")}. Now if I resize the device, the unit object in
oneinch no longer corresponds to a physical length of 1 inch.
}
\seealso{ \code{\link{unit}} }
diff --git a/src/library/grid/man/makeContent.Rd b/src/library/grid/man/makeContent.Rd
index bd9ff85..b252d4d 100644
--- a/src/library/grid/man/makeContent.Rd
+++ b/src/library/grid/man/makeContent.Rd
@@ -37,7 +37,7 @@ makeContent(x)
\code{makeContent} is called next and is where any additional
calculations should occur and graphical content should
be generated (see, for example,
- \code{grid:::makeContent.xaxis}.
+ \code{grid:::makeContent.xaxis}).
This function should be used to \emph{modify} the \code{children}
of a gTree.
The function \emph{must} return the modified \code{x}.
diff --git a/src/library/grid/man/stringWidth.Rd b/src/library/grid/man/stringWidth.Rd
index b7e9e49..eb74415 100644
--- a/src/library/grid/man/stringWidth.Rd
+++ b/src/library/grid/man/stringWidth.Rd
@@ -22,7 +22,7 @@ stringDescent(string)
}
\arguments{
\item{string}{A character vector or a language object (as used for
- \sQuote{\link{plotmath}} calls.}
+ \sQuote{\link{plotmath}} calls).}
}
\value{
A \code{\link{unit}} object.
diff --git a/src/library/grid/tests/testls.Rout.save b/src/library/grid/tests/testls.Rout.save
index 6e991ac..a55ec7f 100644
--- a/src/library/grid/tests/testls.Rout.save
+++ b/src/library/grid/tests/testls.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -340,4 +340,4 @@ List of 6
>
> proc.time()
user system elapsed
- 0.317 0.028 0.328
+ 0.276 0.036 0.293
diff --git a/src/library/methods/man/MethodsList-class.Rd b/src/library/methods/man/MethodsList-class.Rd
index 0a2a2b4..9a98480 100644
--- a/src/library/methods/man/MethodsList-class.Rd
+++ b/src/library/methods/man/MethodsList-class.Rd
@@ -29,7 +29,7 @@ old-style objects. }
argument has that class. See the details below.}
\item{\code{allMethods}:}{A named list, contains
all the directly defined methods from the \code{methods} slot, plus
- any inherited methods. Ignored when methods tables are used for dispatch (see \link{Methods_Details} }
+ any inherited methods. Ignored when methods tables are used for dispatch (see \link{Methods_Details}). }
}}
\details{
diff --git a/src/library/methods/man/RMethodUtils.Rd b/src/library/methods/man/RMethodUtils.Rd
index b49a248..f89741e 100644
--- a/src/library/methods/man/RMethodUtils.Rd
+++ b/src/library/methods/man/RMethodUtils.Rd
@@ -286,7 +286,7 @@ balanceMethodsList(mlist, args, check = TRUE) # <- deprecated since R 3.2.0
A generic function that finds the next method for
the signature of the method definition \code{method} and caches
that method in the method definition (promoting the class to
- \code{"MethodWithNext"}. Note that argument \code{mlist} is
+ \code{"MethodWithNext"}). Note that argument \code{mlist} is
obsolete and not used.
}
diff --git a/src/library/methods/man/StructureClasses.Rd b/src/library/methods/man/StructureClasses.Rd
index 84050aa..87b9b1d 100644
--- a/src/library/methods/man/StructureClasses.Rd
+++ b/src/library/methods/man/StructureClasses.Rd
@@ -95,7 +95,7 @@
Time-series objects, in contrast to matrices and arrays, have a valid
S3 class, \code{"ts"}, registered using an S4-style definition (see the
documentation for \code{\link{setOldClass}} in the examples section
- for an abbreviated listing of how this is done. The S3
+ for an abbreviated listing of how this is done). The S3
inheritance of \code{"mts"} in package \pkg{stats} is also
registered.
These classes, as well as \code{"matrix"} and \code{"array"} should
diff --git a/src/library/methods/man/nonStructure-class.Rd b/src/library/methods/man/nonStructure-class.Rd
index a15dae7..31107c6 100644
--- a/src/library/methods/man/nonStructure-class.Rd
+++ b/src/library/methods/man/nonStructure-class.Rd
@@ -31,7 +31,7 @@
\section{Methods}{
Methods are defined for operators and math functions (groups
- \code{\link{Ops}}, \code{\link{Math}} and \code{\link{Math2}}. In
+ \code{\link{Ops}}, \code{\link{Math}} and \code{\link{Math2}}). In
all cases the result is an ordinary vector of the appropriate type.
}
\references{
diff --git a/src/library/methods/man/refClass.Rd b/src/library/methods/man/refClass.Rd
index 53933c7..4b45e06 100644
--- a/src/library/methods/man/refClass.Rd
+++ b/src/library/methods/man/refClass.Rd
@@ -651,7 +651,7 @@ binding of the class definition.
The new methods can refer to any currently defined method by name
(including other methods supplied in this call to
-\code{$methods()}. %$
+\code{$methods()}). %$
Note though that previously defined methods are not re-analyzed
meaning that they will not call the new method (unless it redefines an
existing method of the same name).
diff --git a/src/library/methods/man/validObject.Rd b/src/library/methods/man/validObject.Rd
index e5b537d..1464312 100644
--- a/src/library/methods/man/validObject.Rd
+++ b/src/library/methods/man/validObject.Rd
@@ -33,7 +33,7 @@ A class definition may have a validity method, set by a call to
and any strings from failure will be included in the result or the
error message.
Any validity methods defined for superclasses (from the \code{contains=}
-argument to \code{\link{setClass}}, will also be called.
+argument to \code{\link{setClass}}), will also be called.
}
diff --git a/src/library/parallel/R/detectCores.R b/src/library/parallel/R/detectCores.R
index 8b14ce8..bf6264f 100644
--- a/src/library/parallel/R/detectCores.R
+++ b/src/library/parallel/R/detectCores.R
@@ -1,7 +1,7 @@
# File src/library/parallel/R/detectCores.R
# Part of the R package, https://www.R-project.org
#
-# Copyright (C) 1995-2016 The R Core Team
+# Copyright (C) 1995-2018 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,9 +28,9 @@ detectCores <-
} else {
function(all.tests = FALSE, logical = TRUE) {
## Commoner OSes first
+ ## for Linux systems, physical id is 1 for second hyperthread
systems <-
- list(linux =
- if(logical) "grep processor /proc/cpuinfo 2>/dev/null | wc -l" else "cat /proc/cpuinfo | grep 'cpu cores'| uniq | cut -f2 -d:",
+ list(linux = "grep ^processor /proc/cpuinfo 2>/dev/null | wc -l",
## hw.physicalcpu is not documented for 10.9, but works
darwin = if(logical) "/usr/sbin/sysctl -n hw.logicalcpu 2>/dev/null" else "/usr/sbin/sysctl -n hw.physicalcpu 2>/dev/null",
solaris = if(logical) "/usr/sbin/psrinfo -v | grep 'Status of.*processor' | wc -l" else "/bin/kstat -p -m cpu_info | grep :core_id | cut -f2 | uniq | wc -l",
diff --git a/src/library/parallel/inst/doc/parallel.pdf b/src/library/parallel/inst/doc/parallel.pdf
index fcdac03..201534b 100644
--- a/src/library/parallel/inst/doc/parallel.pdf
+++ b/src/library/parallel/inst/doc/parallel.pdf
Binary files differ
diff --git a/src/library/parallel/man/detectCores.Rd b/src/library/parallel/man/detectCores.Rd
index a147c61..6bfd687 100644
--- a/src/library/parallel/man/detectCores.Rd
+++ b/src/library/parallel/man/detectCores.Rd
@@ -1,6 +1,6 @@
% File src/library/parallel/man/detectCores.Rd
% Part of the R package, https://www.R-project.org
-% Copyright 2011-2016 R Core Team
+% Copyright 2011-2018 R Core Team
% Distributed under GPL 2 or later
\name{detectCores}
@@ -16,7 +16,7 @@ detectCores(all.tests = FALSE, logical = TRUE)
\item{all.tests}{Logical: if true apply all known tests.}
\item{logical}{Logical: if possible, use the number of physical CPUs/cores
(if \code{FALSE}) or logical CPUs (if \code{TRUE}). Currently this
- is honoured only on Linux, macOS, Sparc Solaris and Windows.}
+ is honoured only on macOS, Solaris and Windows.}
}
\details{
This attempts to detect the number of available CPU cores.
@@ -51,16 +51,16 @@ detectCores(all.tests = FALSE, logical = TRUE)
On Sparc Solaris \code{logical = FALSE} returns the number of physical
cores and \code{logical = TRUE} returns the number of available
- hardware threads. (Some Sparc CPUs which do have multiple cores per
- CPU, others have multiple threads per core and some have both.) For
- example, the UltraSparc T2 CPU in the CRAN check server is a single
+ hardware threads. (Some Sparc CPUs have multiple cores per CPU, others
+ have multiple threads per core and some have both.) For example, the
+ UltraSparc T2 CPU in the former CRAN check server was a single
physical CPU with 8 cores, and each core supports 8 hardware threads.
So \code{detectCores(logical = FALSE)} returns 8, and
\code{detectCores(logical = TRUE)} returns 64.
Where virtual machines are in use, one would hope that the result
- represents the number of CPUs available (or potentially available) to
- that particular VM.
+ for \code{logical = TRUE} represents the number of CPUs available (or
+ potentially available) to that particular VM.
}
\author{
Simon Urbanek and Brian Ripley
diff --git a/src/library/parallel/tests/multicore2.Rout.save b/src/library/parallel/tests/multicore2.Rout.save
index fe816d7..1cb416b 100644
--- a/src/library/parallel/tests/multicore2.Rout.save
+++ b/src/library/parallel/tests/multicore2.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -45,4 +45,4 @@ Calculations on Transformed Scale; Intervals on Original Scale
>
> proc.time()
user system elapsed
- 0.214 0.041 0.416
+ 0.173 0.036 0.347
diff --git a/src/library/parallel/tests/snow2.Rout.save b/src/library/parallel/tests/snow2.Rout.save
index 0b8e5ba..74ef9f0 100644
--- a/src/library/parallel/tests/snow2.Rout.save
+++ b/src/library/parallel/tests/snow2.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -50,4 +50,4 @@ Calculations on Transformed Scale; Intervals on Original Scale
>
> proc.time()
user system elapsed
- 0.218 0.049 0.872
+ 0.203 0.045 0.774
diff --git a/src/library/stats/R/distn.R b/src/library/stats/R/distn.R
index e576a95..2d49a95 100644
--- a/src/library/stats/R/distn.R
+++ b/src/library/stats/R/distn.R
@@ -1,7 +1,7 @@
# File src/library/stats/R/distn.R
# Part of the R package, https://www.R-project.org
#
-# Copyright (C) 1995-2016 The R Core Team
+# Copyright (C) 1995-2018 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -133,8 +133,7 @@ qbeta <- function(p, shape1, shape2, ncp=0, lower.tail = TRUE, log.p = FALSE) {
else .Call(C_qnbeta, p, shape1, shape2, ncp, lower.tail, log.p)
}
rbeta <- function(n, shape1, shape2, ncp = 0) {
- if(is.na(ncp)) { warning("NAs produced"); rep(NaN, n) }
- else if(ncp == 0) .Call(C_rbeta, n, shape1, shape2)
+ if(missing(ncp)) .Call(C_rbeta, n, shape1, shape2)
else {
X <- rchisq(n, 2*shape1, ncp =ncp)
X/(X + rchisq(n, 2*shape2))
@@ -212,7 +211,6 @@ qf <- function(p, df1, df2, ncp, lower.tail = TRUE, log.p = FALSE) {
rf <- function(n, df1, df2, ncp)
{
if(missing(ncp)) .Call(C_rf, n, df1, df2)
- else if(is.na(ncp)) { warning("NAs produced"); rep(NaN, n) }
else (rchisq(n, df1, ncp=ncp)/df1)/(rchisq(n, df2)/df2)
}
diff --git a/src/library/stats/R/nls.R b/src/library/stats/R/nls.R
index 7b368f5..b601ee1 100644
--- a/src/library/stats/R/nls.R
+++ b/src/library/stats/R/nls.R
@@ -1,8 +1,8 @@
# File src/library/stats/R/nls.R
# Part of the R package, https://www.R-project.org
#
+# Copyright (C) 2000-2017 The R Core Team
# Copyright (C) 1999-1999 Saikat DebRoy, Douglas M. Bates, Jose C. Pinheiro
-# Copyright (C) 2000-2016 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,9 +55,9 @@ nlsModel.plinear <- function(form, data, start, wts)
rhs <- eval(form[[3L]], envir = env)
storage.mode(rhs) <- "double"
.swts <- if(!missing(wts) && length(wts))
- sqrt(wts) else rep_len(1, NROW(rhs))
+ sqrt(wts) else 1 # more efficient than rep_len(1, NROW(rhs))
assign(".swts", .swts, envir = env)
- p1 <- if(is.matrix(rhs)) ncol(rhs) else 1
+ p1 <- NCOL(rhs)
p <- p1 + p2
n <- length(lhs)
fac <- (n - p)/p
@@ -287,7 +287,9 @@ nlsModel <- function(form, data, start, wts, upper=NULL)
attr(ans, "gradient") <- eval(gradCall)
ans
}
- QR <- qr(.swts * attr(rhs, "gradient"))
+ if(length(gr <- attr(rhs, "gradient")) == 1L)
+ attr(rhs, "gradient") <- gr <- as.vector(gr)
+ QR <- qr(.swts * gr)
qrDim <- min(dim(QR$qr))
if(QR$rank < qrDim)
stop("singular gradient matrix at initial parameter estimates")
@@ -355,9 +357,9 @@ nlsModel <- function(form, data, start, wts, upper=NULL)
(lhs - assign("rhs", getRHS(), envir = thisEnv)),
envir = thisEnv)
assign("dev", sum(resid^2), envir = thisEnv)
- assign("QR", qr(.swts * attr(rhs, "gradient")),
- envir = thisEnv )
- return(QR$rank < min(dim(QR$qr))) # to catch the singular gradient matrix
+ if(length(gr <- attr(rhs, "gradient")) == 1L) gr <- c(gr)
+ assign("QR", qr(.swts * gr), envir = thisEnv )
+ (QR$rank < min(dim(QR$qr))) # to catch the singular gradient matrix
},
getPars = function() getPars(),
getAllPars = function() getPars(),
@@ -370,7 +372,6 @@ nlsModel <- function(form, data, start, wts, upper=NULL)
predict = function(newdata = list(), qr = FALSE)
eval(form[[3L]], as.list(newdata), env)
)
-
class(m) <- "nlsModel"
m
}
@@ -467,6 +468,10 @@ nls <-
names(attr(data, "parameters"))
} else { ## try selfStart - like object
cll <- formula[[length(formula)]]
+ if(is.symbol(cll)) { ## replace y ~ S by y ~ S + 0 :
+ ## formula[[length(formula)]] <-
+ cll <- substitute(S + 0, list(S = cll))
+ }
fn <- as.character(cll[[1L]])
if(is.null(func <- tryCatch(get(fn), error=function(e)NULL)))
func <- get(fn, envir=parent.frame()) ## trying "above"
@@ -490,7 +495,6 @@ nls <-
## exists(var, data) does not work (with lists or dataframes):
lenVar <- function(var) tryCatch(length(eval(as.name(var), data, env)),
error = function(e) -1L)
-
if(length(varNames)) {
n <- vapply(varNames, lenVar, 0)
if(any(not.there <- n == -1L)) {
@@ -537,6 +541,7 @@ nls <-
varIndex <- n %% respLength == 0
if(is.list(data) && diff(range(n[names(n) %in% names(data)])) > 0) {
## 'data' is a list that can not be coerced to a data.frame
+ ## (not using varNames, varIndex at all - inconsistency FIXME?)
mf <- data
if(!missing(subset))
warning("argument 'subset' will be ignored")
@@ -550,12 +555,14 @@ nls <-
rhs <- eval(formula[[3L]], data, startEnv)
n <- NROW(rhs)
## mimic what model.frame.default does
- wts <- if (mWeights) rep_len(1, n) else
- eval(substitute(weights), data, environment(formula))
+ wts <- if (mWeights) rep_len(1, n)
+ else eval(substitute(weights), data, environment(formula))
}
else {
+ vNms <- varNames[varIndex]
+ if(any(nEQ <- vNms != make.names(vNms))) vNms[nEQ] <- paste0("`", vNms[nEQ], "`")
mf$formula <- # replace by one-sided linear model formula
- as.formula(paste("~", paste(varNames[varIndex], collapse = "+")),
+ as.formula(paste("~", paste(vNms, collapse = "+")),
env = environment(formula))
mf$start <- mf$control <- mf$algorithm <- mf$trace <- mf$model <- NULL
mf$lower <- mf$upper <- NULL
diff --git a/src/library/stats/R/power.R b/src/library/stats/R/power.R
index 638967e..7a18111 100644
--- a/src/library/stats/R/power.R
+++ b/src/library/stats/R/power.R
@@ -1,7 +1,7 @@
# File src/library/stats/R/power.R
# Part of the R package, https://www.R-project.org
#
-# Copyright (C) 1995-2015 The R Core Team
+# Copyright (C) 1995-2017 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,6 +32,7 @@ power.t.test <-
alternative <- match.arg(alternative)
tsample <- switch(type, one.sample = 1, two.sample = 2, paired = 1)
+ force(tsample)# codetools
tside <- switch(alternative, one.sided = 1, two.sided = 2)
if (tside == 2 && !is.null(delta)) delta <- abs(delta)
@@ -121,25 +122,30 @@ power.prop.test <-
else if (is.null(n))
n <- uniroot(function(n) eval(p.body) - power,
c(1,1e7), tol=tol, extendInt = "upX")$root
- else if (is.null(p1))
+ else if (is.null(p1)) {
p1 <- uniroot(function(p1) eval(p.body) - power,
c(0,p2), tol=tol, extendInt = "yes")$root
- else if (is.null(p2))
+ if(p1 < 0) warning("No p1 in in [0, p2] can be found to achieve the desired power")
+ }
+ else if (is.null(p2)) {
p2 <- uniroot(function(p2) eval(p.body) - power,
c(p1,1), tol=tol, extendInt = "yes")$root
- else if (is.null(sig.level))
+ if(p2 > 1) warning("No p2 in in [p1, 1] can be found to achieve the desired power")
+ }
+ else if (is.null(sig.level)) {
sig.level <- uniroot(function(sig.level) eval(p.body) - power,
- c(1e-10, 1-1e-10), tol=tol, extendInt = "upX")$root
+ c(1e-10, 1-1e-10), tol=tol, extendInt = "upX")$root
+ if(sig.level < 0 || sig.level > 1)
+ warning("No significance level [0, 1] can be found to achieve the desired power")
+ }
else # Shouldn't happen
stop("internal error", domain = NA)
- NOTE <- "n is number in *each* group"
-
- METHOD <- "Two-sample comparison of proportions power calculation"
-
structure(list(n=n, p1=p1, p2=p2,
sig.level=sig.level, power=power,
- alternative=alternative, note=NOTE, method=METHOD),
+ alternative=alternative,
+ note = "n is number in *each* group",
+ method = "Two-sample comparison of proportions power calculation"),
class="power.htest")
}
diff --git a/src/library/stats/man/Beta.Rd b/src/library/stats/man/Beta.Rd
index 52d1f9d..6298033 100644
--- a/src/library/stats/man/Beta.Rd
+++ b/src/library/stats/man/Beta.Rd
@@ -91,7 +91,7 @@ rbeta(n, shape1, shape2, ncp = 0)
The non-central case is based on the derivation as a Poisson
mixture of betas (Johnson \emph{et al}, 1995, pp.\sspace{}502--3).
- \item The central \code{pbeta} for the default \code{log_p = FALSE})
+ \item The central \code{pbeta} for the default (\code{log_p = FALSE})
uses a C translation based on
Didonato, A. and Morris, A., Jr, (1992)
diff --git a/src/library/stats/man/Chisquare.Rd b/src/library/stats/man/Chisquare.Rd
index 171f759..8b8adb6 100644
--- a/src/library/stats/man/Chisquare.Rd
+++ b/src/library/stats/man/Chisquare.Rd
@@ -73,7 +73,7 @@ rchisq(n, df, ncp = 0)
non-centrality \eqn{\lambda > 0},
see Johnson \emph{et al} (1995, chapter 29).
In that (noncentral, zero df) case, the distribution is a mixture of a
- point mass at \eqn{x = 0} (of size \code{pchisq(0, df=0, ncp=ncp)} and
+ point mass at \eqn{x = 0} (of size \code{pchisq(0, df=0, ncp=ncp)}) and
a continuous part, and \code{dchisq()} is \emph{not} a density with
respect to that mixture measure but rather the limit of the density
for \eqn{df \to 0}{df -> 0}.
diff --git a/src/library/stats/man/Fdist.Rd b/src/library/stats/man/Fdist.Rd
index 946a004..9eb41fe 100644
--- a/src/library/stats/man/Fdist.Rd
+++ b/src/library/stats/man/Fdist.Rd
@@ -123,7 +123,7 @@ stopifnot(all.equal(2*pt(x,nu) - 1, pf(x^2, 1,nu)),
# check this is the same as the density of F_{1,m}
all.equal(df(x^2, 1, 5), dt(x, 5)/x)
-## Identity: qf(2*p - 1, 1, df)) == qt(p, df)^2) for p >= 1/2
+## Identity: qf(2*p - 1, 1, df) == qt(p, df)^2 for p >= 1/2
p <- seq(1/2, .99, length = 50); df <- 10
rel.err <- function(x, y) ifelse(x == y, 0, abs(x-y)/mean(abs(c(x,y))))
\donttest{quantile(rel.err(qf(2*p - 1, df1 = 1, df2 = df), qt(p, df)^2), .90) # ~= 7e-9}
diff --git a/src/library/stats/man/GammaDist.Rd b/src/library/stats/man/GammaDist.Rd
index dd891a5..cded4e5 100644
--- a/src/library/stats/man/GammaDist.Rd
+++ b/src/library/stats/man/GammaDist.Rd
@@ -88,7 +88,7 @@ rgamma(n, shape, rate = 1, scale = 1/rate)
% small \code{scale}, and warns of potential unreliability for
% \code{scale < 1e-10}.
\note{
- The S (Becker \emph{et al} (1988) parametrization was via \code{shape}
+ The S (Becker \emph{et al}, 1988) parametrization was via \code{shape}
and \code{rate}: S had no \code{scale} parameter. It is an error
to supply and \code{scale} and \code{rate}.
diff --git a/src/library/stats/man/KalmanLike.Rd b/src/library/stats/man/KalmanLike.Rd
index ddd868d..640b2f9 100644
--- a/src/library/stats/man/KalmanLike.Rd
+++ b/src/library/stats/man/KalmanLike.Rd
@@ -65,7 +65,7 @@ makeARIMA(phi, theta, Delta, kappa = 1e6,
\item{\code{a}}{the current state estimate}
\item{\code{P}}{the current estimate of the state uncertainty matrix \eqn{Q}}
\item{\code{Pn}}{the estimate at time \eqn{t-1} of the state
- uncertainty matrix \eqn{Q} (not updated by \code{KalmanForecast}.}
+ uncertainty matrix \eqn{Q} (not updated by \code{KalmanForecast}).}
}
\code{KalmanSmooth} is the workhorse function for \code{\link{tsSmooth}}.
diff --git a/src/library/stats/man/NLSstAsymptotic.Rd b/src/library/stats/man/NLSstAsymptotic.Rd
index 4681110..3e95edc 100644
--- a/src/library/stats/man/NLSstAsymptotic.Rd
+++ b/src/library/stats/man/NLSstAsymptotic.Rd
@@ -16,7 +16,7 @@ NLSstAsymptotic(xy)
}
\description{
Fits the asymptotic regression model, in the form \code{b0 +
- b1*(1-exp(-exp(lrc) * x)} to the \code{xy} data.
+ b1*(1-exp(-exp(lrc) * x))} to the \code{xy} data.
This can be used as a building block in determining starting estimates
for more complicated models.
}
diff --git a/src/library/stats/man/anova.mlm.Rd b/src/library/stats/man/anova.mlm.Rd
index ddbe5f2..a11529f 100644
--- a/src/library/stats/man/anova.mlm.Rd
+++ b/src/library/stats/man/anova.mlm.Rd
@@ -45,7 +45,7 @@
\code{\link{summary.manova}} for further details.
For the \code{"Spherical"} test, proportionality is usually with the
- identity matrix but a different matrix can be specified using \code{Sigma}).
+ identity matrix but a different matrix can be specified using \code{Sigma}.
Corrections for asphericity known as the Greenhouse--Geisser,
respectively Huynh--Feldt, epsilons are given and adjusted \eqn{F} tests are
performed.
diff --git a/src/library/stats/man/bandwidth.Rd b/src/library/stats/man/bandwidth.Rd
index 0a8c379..7094766 100644
--- a/src/library/stats/man/bandwidth.Rd
+++ b/src/library/stats/man/bandwidth.Rd
@@ -49,7 +49,7 @@ bw.SJ(x, nb = 1000, lower = 0.1 * hmax, upper = hmax,
It defaults to 0.9 times the
minimum of the standard deviation and the interquartile range divided by
1.34 times the sample size to the negative one-fifth power
- (= Silverman's \sQuote{rule of thumb}, Silverman (1986, page 48, eqn (3.31))
+ (= Silverman's \sQuote{rule of thumb}, Silverman (1986, page 48, eqn (3.31)))
\emph{unless} the quartiles coincide when a positive result
will be guaranteed.
diff --git a/src/library/stats/man/box.test.Rd b/src/library/stats/man/box.test.Rd
index d67a04e..9077380 100644
--- a/src/library/stats/man/box.test.Rd
+++ b/src/library/stats/man/box.test.Rd
@@ -36,7 +36,7 @@ Box.test(x, lag = 1, type = c("Box-Pierce", "Ljung-Box"), fitdf = 0)
A list with class \code{"htest"} containing the following components:
\item{statistic}{the value of the test statistic.}
\item{parameter}{the degrees of freedom of the approximate chi-squared
- distribution of the test statistic (taking \code{fitdf} into account.}
+ distribution of the test statistic (taking \code{fitdf} into account).}
\item{p.value}{the p-value of the test.}
\item{method}{a character string indicating which type of test was
performed.}
diff --git a/src/library/stats/man/dendrapply.Rd b/src/library/stats/man/dendrapply.Rd
index 013c059..51d2272 100644
--- a/src/library/stats/man/dendrapply.Rd
+++ b/src/library/stats/man/dendrapply.Rd
@@ -11,7 +11,7 @@
recursively. When \code{y <- dendrapply(x, fn)}, then \code{y} is a
dendrogram of the same graph structure as \code{x} and for each node,
\code{y.node[j] <- FUN( x.node[j], ...)} (where \code{y.node[j]} is an
- (invalid!) notation for the j-th node of y.
+ (invalid!) notation for the j-th node of y).
}
\usage{
dendrapply(X, FUN, ...)
diff --git a/src/library/stats/man/family.Rd b/src/library/stats/man/family.Rd
index 9d9256c..62b7765 100644
--- a/src/library/stats/man/family.Rd
+++ b/src/library/stats/man/family.Rd
@@ -136,7 +136,7 @@ quasipoisson(link = "log")
\eqn{d\mu/d\eta}.}
\item{initialize}{expression. This needs to set up whatever data
objects are needed for the family as well as \code{n} (needed for
- AIC in the binomial family) and \code{mustart} (see \code{\link{glm}}.}
+ AIC in the binomial family) and \code{mustart} (see \code{\link{glm}}).}
\item{validmu}{logical function. Returns \code{TRUE} if a mean
vector \code{mu} is within the domain of \code{variance}.}
\item{valideta}{logical function. Returns \code{TRUE} if a linear
diff --git a/src/library/stats/man/kernel.Rd b/src/library/stats/man/kernel.Rd
index 2c0cb0f..8dffc73 100644
--- a/src/library/stats/man/kernel.Rd
+++ b/src/library/stats/man/kernel.Rd
@@ -32,7 +32,7 @@ is.tskernel(k)
\item{coef}{the upper half of the smoothing kernel coefficients
(including coefficient zero) \emph{or} the name of a kernel
(currently \code{"daniell"}, \code{"dirichlet"}, \code{"fejer"} or
- \code{"modified.daniell"}.}
+ \code{"modified.daniell"}).}
\item{m}{the kernel dimension(s) if \code{coef} is a name. When \code{m}
has length larger than one, it means the convolution of
kernels of dimension \code{m[j]}, for \code{j in 1:length(m)}.
diff --git a/src/library/stats/man/lag.plot.Rd b/src/library/stats/man/lag.plot.Rd
index 9e66a3c..9592065 100644
--- a/src/library/stats/man/lag.plot.Rd
+++ b/src/library/stats/man/lag.plot.Rd
@@ -23,7 +23,7 @@ lag.plot(x, lags = 1, layout = NULL, set.lags = 1:lags,
\item{lags}{number of lag plots desired, see arg \code{set.lags}.}
\item{layout}{the layout of multiple plots, basically the \code{mfrow}
\code{\link{par}()} argument. The default uses about a square
- layout (see \code{\link{n2mfrow}} such that all plots are on one page.}
+ layout (see \code{\link{n2mfrow}}) such that all plots are on one page.}
\item{set.lags}{vector of positive integers allowing specification of
the set of lags used; defaults to \code{1:lags}.}
\item{main}{character with a main header title to be done on the top
diff --git a/src/library/stats/man/line.Rd b/src/library/stats/man/line.Rd
index 3ad2ba3..3b9342e 100644
--- a/src/library/stats/man/line.Rd
+++ b/src/library/stats/man/line.Rd
@@ -9,6 +9,9 @@
\title{Robust Line Fitting}
\description{
Fit a line robustly as recommended in \emph{Exploratory Data Analysis}.
+
+ Currently the initial median-median line is \emph{not} iterated (as
+ opposed to Tukey's \dQuote{resistant line} in the references).
}
\usage{
line(x, y)
diff --git a/src/library/stats/man/lmfit.Rd b/src/library/stats/man/lmfit.Rd
index eeeb572..f338781 100644
--- a/src/library/stats/man/lmfit.Rd
+++ b/src/library/stats/man/lmfit.Rd
@@ -32,7 +32,7 @@ lm.wfit(x, y, w, offset = NULL, method = "qr", tol = 1e-7,
\item{w}{vector of weights (length \code{n}) to be used in the fitting
process for the \code{wfit} functions. Weighted least squares is
used with weights \code{w}, i.e., \code{sum(w * e^2)} is minimized.}
- \item{offset}{numeric of length \code{n}). This can be used to
+ \item{offset}{(numeric of length \code{n}). This can be used to
specify an \emph{a priori} known component to be included in the
linear predictor during fitting.}
diff --git a/src/library/stats/man/monthplot.Rd b/src/library/stats/man/monthplot.Rd
index 5e0d572..bacab97 100644
--- a/src/library/stats/man/monthplot.Rd
+++ b/src/library/stats/man/monthplot.Rd
@@ -50,7 +50,7 @@ monthplot(x, \dots)
\item{axes}{Should axes be drawn (ignored if \code{add = TRUE})?}
\item{type}{Type of plot. The default is to join the points with
lines, and \code{"h"} is for histogram-like vertical lines.}
- \item{box}{Should a box be drawn (ignored if \code{add = TRUE}?}
+ \item{box}{Should a box be drawn (ignored if \code{add = TRUE})?}
\item{add}{Should thus just add on an existing plot.}
\item{col, lty, lwd}{Graphics parameters for the series.}
\item{col.base, lty.base, lwd.base}{Graphics parameters for the
diff --git a/src/library/stats/man/plot.lm.Rd b/src/library/stats/man/plot.lm.Rd
index 6e47d73..5b5efec 100644
--- a/src/library/stats/man/plot.lm.Rd
+++ b/src/library/stats/man/plot.lm.Rd
@@ -80,7 +80,7 @@
The \sQuote{Scale-Location} plot, also called \sQuote{Spread-Location} or
\sQuote{S-L} plot, takes the square root of the absolute residuals in
- order to diminish skewness (\eqn{\sqrt{| E |}}{sqrt(|E|)}) is much less skewed
+ order to diminish skewness (\eqn{\sqrt{| E |}}{sqrt(|E|)} is much less skewed
than \eqn{| E |} for Gaussian zero-mean \eqn{E}).
The \sQuote{S-L}, the Q-Q, and the Residual-Leverage plot, use
diff --git a/src/library/stats/man/plot.ppr.Rd b/src/library/stats/man/plot.ppr.Rd
index 7e3c138..e00b914 100644
--- a/src/library/stats/man/plot.ppr.Rd
+++ b/src/library/stats/man/plot.ppr.Rd
@@ -50,7 +50,7 @@
require(graphics)
rock1 <- within(rock, { area1 <- area/10000; peri1 <- peri/10000 })
-par(mfrow = c(3,2)) # maybe: , pty = "s")
+par(mfrow = c(3,2)) # maybe: , pty = "s"
rock.ppr <- ppr(log(perm) ~ area1 + peri1 + shape,
data = rock1, nterms = 2, max.terms = 5)
plot(rock.ppr, main = "ppr(log(perm)~ ., nterms=2, max.terms=5)")
diff --git a/src/library/stats/man/power.prop.test.Rd b/src/library/stats/man/power.prop.test.Rd
index c4879e6..bdb0bb4 100644
--- a/src/library/stats/man/power.prop.test.Rd
+++ b/src/library/stats/man/power.prop.test.Rd
@@ -1,6 +1,6 @@
% File src/library/stats/man/power.prop.test.Rd
% Part of the R package, https://www.R-project.org
-% Copyright (C) 1995-2014 R Core Team
+% Copyright (C) 1995-2017 R Core Team
% Distributed under GPL 2 or later
\name{power.prop.test}
@@ -31,14 +31,23 @@ power.prop.test(n = NULL, p1 = NULL, p2 = NULL, sig.level = 0.05,
\details{
Exactly one of the parameters \code{n}, \code{p1}, \code{p2},
\code{power}, and \code{sig.level} must be passed as NULL, and that
- parameter is determined from the others. Notice that \code{sig.level}
- has a non-NULL default so NULL must be explicitly passed if you want
- it computed.
+ parameter is determined from the others. Notice that \code{sig.level}
+ has a non-NULL default so \code{NULL} must be explicitly passed if you
+ want it computed.
If \code{strict = TRUE} is used, the power will include the probability of
rejection in the opposite direction of the true effect, in the two-sided
- case. Without this the power will be half the significance level if the
+ case. Without this the power will be half the significance level if the
true difference is zero.
+
+ Note that not all conditions can be satisfied, e.g., for \preformatted{power.prop.test(n=30, p1=0.90, p2=NULL, power=0.8, strict=TRUE)}
+ there is no proportion \code{p2} between \code{p1 = 0.9} and 1, as
+ you'd need a sample size of at least \eqn{n = 74} to yield the
+ desired power for \eqn{(p1,p2) = (0.9, 1)}.
+
+ For these impossible conditions, currently a warning
+ (\code{\link{warning}}) is signalled which may become an error
+ (\code{\link{stop}}) in the future.
}
\value{
Object of class \code{"power.htest"}, a list of the arguments
@@ -49,11 +58,11 @@ power.prop.test(n = NULL, p1 = NULL, p2 = NULL, sig.level = 0.05,
\enc{Ekstrøm}{Ekstroem}}
\note{
- \code{uniroot} is used to solve power equation for unknowns, so
+ \code{\link{uniroot}} is used to solve power equation for unknowns, so
you may see errors from it, notably about inability to bracket the
- root when invalid arguments are given. If one of them is computed
- \code{p1 < p2} will hold, although this is not enforced when both are
- specified.
+ root when invalid arguments are given. If one of \code{p1} and
+ \code{p2} is computed, then \eqn{p1 < p2} is assumed and will hold,
+ but if you specify both, \eqn{p2 \le p1}{p2 <= p1} is allowed.
}
\seealso{\code{\link{prop.test}}, \code{\link{uniroot}}}
@@ -66,5 +75,10 @@ power.prop.test(n = 50, p1 = .5, p2 = 0.9, power = .90, sig.level=NULL)
## => sig.l = 0.00131
power.prop.test(p1 = .5, p2 = 0.501, sig.level=.001, power=0.90)
## => n = 10451937
+try(
+ power.prop.test(n=30, p1=0.90, p2=NULL, power=0.8)
+) # a warning (which may become an error)
+## Reason:
+power.prop.test( p1=0.90, p2= 1.0, power=0.8) ##-> n = 73.37
}
\keyword{ htest }
diff --git a/src/library/stats/man/predict.lm.Rd b/src/library/stats/man/predict.lm.Rd
index 16b1344..831edc2 100644
--- a/src/library/stats/man/predict.lm.Rd
+++ b/src/library/stats/man/predict.lm.Rd
@@ -42,7 +42,7 @@
\details{
\code{predict.lm} produces predicted values, obtained by evaluating
the regression function in the frame \code{newdata} (which defaults to
- \code{model.frame(object)}. If the logical \code{se.fit} is
+ \code{model.frame(object)}). If the logical \code{se.fit} is
\code{TRUE}, standard errors of the predictions are calculated. If
the numeric argument \code{scale} is set (with optional \code{df}), it
is used as the residual standard deviation in the computation of the
diff --git a/src/library/stats/man/reorder.dendrogram.Rd b/src/library/stats/man/reorder.dendrogram.Rd
index 2f331ef..41e8fbb 100644
--- a/src/library/stats/man/reorder.dendrogram.Rd
+++ b/src/library/stats/man/reorder.dendrogram.Rd
@@ -29,7 +29,7 @@
weights. At each node, the branches are ordered in
increasing weights where the weight of a branch is defined as
\eqn{f(w_j)} where \eqn{f} is \code{agglo.FUN} and \eqn{w_j} is the
- weight of the \eqn{j}-th sub branch).
+ weight of the \eqn{j}-th sub branch.
}
\value{
A dendrogram where each node has a further attribute \code{value} with
diff --git a/src/library/stats/man/spec.taper.Rd b/src/library/stats/man/spec.taper.Rd
index fc0dae5..ff06882 100644
--- a/src/library/stats/man/spec.taper.Rd
+++ b/src/library/stats/man/spec.taper.Rd
@@ -14,7 +14,7 @@ spec.taper(x, p = 0.1)
\item{p}{The proportion to be tapered at each end of the series,
either a scalar (giving the proportion for all series)
or a vector of the length of the number of series (giving the
- proportion for each series..}
+ proportion for each series).}
}
\description{
Apply a cosine-bell taper to a time series.
diff --git a/src/library/stats/tests/bandwidth.Rout.save b/src/library/stats/tests/bandwidth.Rout.save
index 535da67..79ddced 100644
--- a/src/library/stats/tests/bandwidth.Rout.save
+++ b/src/library/stats/tests/bandwidth.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -46,4 +46,4 @@ In bw.bcv(precip) : minimum occurred at one end of the range
>
> proc.time()
user system elapsed
- 0.226 0.038 0.245
+ 0.202 0.027 0.209
diff --git a/src/library/stats/tests/glm.Rout.save b/src/library/stats/tests/glm.Rout.save
index fb2cffb..ddc4c87 100644
--- a/src/library/stats/tests/glm.Rout.save
+++ b/src/library/stats/tests/glm.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -29,4 +29,4 @@ Warning messages:
>
> proc.time()
user system elapsed
- 0.189 0.034 0.203
+ 0.161 0.024 0.165
diff --git a/src/library/stats/tests/ks-test.Rout.save b/src/library/stats/tests/ks-test.Rout.save
index 0e7d7d2..0c3349a 100644
--- a/src/library/stats/tests/ks-test.Rout.save
+++ b/src/library/stats/tests/ks-test.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -362,4 +362,4 @@ difference in location 3.741417e-05 3.741417e-05 3.741417e-05
>
> proc.time()
user system elapsed
- 0.397 0.033 0.413
+ 0.357 0.033 0.372
diff --git a/src/library/stats/tests/nls.R b/src/library/stats/tests/nls.R
index e823993..ccfcc1d 100644
--- a/src/library/stats/tests/nls.R
+++ b/src/library/stats/tests/nls.R
@@ -250,7 +250,6 @@ getExpmat <- function(theta, t)
for(i in 1:length(theta)) conc[, i] <- exp(-theta[i] * t)
conc
}
-
expsum <- as.vector(getExpmat(c(.05,.005), 1:100) %*% c(1,1))
expsumNoisy <- expsum + max(expsum) *.001 * rnorm(100)
expsum.df <-data.frame(expsumNoisy)
@@ -276,8 +275,39 @@ y <- b0 + b1*x + rnorm(200, sd=0.05)
fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=1),
algorithm ="port", upper = c(100, 100, 100))
# next did not "fail" in proposed fix:
-fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101),
+fiB <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101),
algorithm ="port", upper = c(100, 100, 100),
control = list(warnOnly=TRUE))# warning ..
-with(fit$convInfo, ## start par. violates constraints
+with(fiB$convInfo, ## start par. violates constraints
stopifnot(isConv == FALSE, stopCode == 300))
+
+
+## PR#17367 -- nls() quoting non-syntactical variable names
+##
+op <- options(warn = 2)# no warnings allowed from here
+##
+dN <- data.frame('NO [µmol/l]' = c(1,3,8,17), t = 1:4, check.names=FALSE)
+fnN <- `NO [µmol/l]` ~ a + k* exp(t)
+## lm() works, nls() should too
+lm.N <- lm(`NO [µmol/l]` ~ exp(t) , data = dN)
+summary(lm.N) -> slmN
+nm. <- nls(`NO [µmol/l]` ~ a + k*exp(t), start=list(a=0,k=1), data = dN)
+## In R <= 3.4.x : Error in eval(predvars, data, env) : object 'NO' not found
+nmf <- nls(fnN, start=list(a=0,k=1), data = dN)
+## (ditto; gave identical error)
+noC <- function(L) L[-match("call", names(L))]
+stopifnot(all.equal(noC (nm.), noC (nmf)))
+##
+## with list for which as.data.frame() does not work [-> different branch, not using model.frame!]
+## list version (has been valid "forever", still doubtful, rather give error [FIXME] ?)
+lsN <- c(as.list(dN), list(foo="bar")); lsN[["t"]] <- 1:8
+nmL <- nls(`NO [µmol/l]` ~ a + k*exp(t), start=list(a=0,k=1), data = lsN)
+stopifnot(all.equal(coef(nmL), c(a = 5.069866, k = 0.003699669), tol = 4e-7))# seen 4.2e-8
+
+## trivial RHS -- should work even w/o 'start='
+fi1 <- nls(y ~ a, start = list(a=1))
+## -> 2 deprecation warnings "length 1 in vector-arithmetic" from nlsModel() in R 3.4.x ..
+options(op) # warnings about missing 'start' ok:
+f.1 <- nls(y ~ a) # failed in R 3.4.x
+stopifnot(all.equal(noC(f.1), noC(fi1)),
+ all.equal(coef(f.1), c(a = mean(y))))
diff --git a/src/library/stats/tests/nls.Rout.save b/src/library/stats/tests/nls.Rout.save
index d9a4740..a494379 100644
--- a/src/library/stats/tests/nls.Rout.save
+++ b/src/library/stats/tests/nls.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -637,7 +637,6 @@ Nonlinear regression model
+ for(i in 1:length(theta)) conc[, i] <- exp(-theta[i] * t)
+ conc
+ }
->
> expsum <- as.vector(getExpmat(c(.05,.005), 1:100) %*% c(1,1))
> expsumNoisy <- expsum + max(expsum) *.001 * rnorm(100)
> expsum.df <-data.frame(expsumNoisy)
@@ -693,14 +692,49 @@ Algorithm "port", convergence message: both X-convergence and relative convergen
> fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=1),
+ algorithm ="port", upper = c(100, 100, 100))
> # next did not "fail" in proposed fix:
-> fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101),
+> fiB <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101),
+ algorithm ="port", upper = c(100, 100, 100),
+ control = list(warnOnly=TRUE))# warning ..
Warning in nls(y ~ b0[fac] + b1 * x, start = list(b0 = c(1, 1), b1 = 101), :
Convergence failure: initial par violates constraints
-> with(fit$convInfo, ## start par. violates constraints
+> with(fiB$convInfo, ## start par. violates constraints
+ stopifnot(isConv == FALSE, stopCode == 300))
>
+>
+> ## PR#17367 -- nls() quoting non-syntactical variable names
+> ##
+> op <- options(warn = 2)# no warnings allowed from here
+> ##
+> dN <- data.frame('NO [µmol/l]' = c(1,3,8,17), t = 1:4, check.names=FALSE)
+> fnN <- `NO [µmol/l]` ~ a + k* exp(t)
+> ## lm() works, nls() should too
+> lm.N <- lm(`NO [µmol/l]` ~ exp(t) , data = dN)
+> summary(lm.N) -> slmN
+> nm. <- nls(`NO [µmol/l]` ~ a + k*exp(t), start=list(a=0,k=1), data = dN)
+> ## In R <= 3.4.x : Error in eval(predvars, data, env) : object 'NO' not found
+> nmf <- nls(fnN, start=list(a=0,k=1), data = dN)
+> ## (ditto; gave identical error)
+> noC <- function(L) L[-match("call", names(L))]
+> stopifnot(all.equal(noC (nm.), noC (nmf)))
+> ##
+> ## with list for which as.data.frame() does not work [-> different branch, not using model.frame!]
+> ## list version (has been valid "forever", still doubtful, rather give error [FIXME] ?)
+> lsN <- c(as.list(dN), list(foo="bar")); lsN[["t"]] <- 1:8
+> nmL <- nls(`NO [µmol/l]` ~ a + k*exp(t), start=list(a=0,k=1), data = lsN)
+> stopifnot(all.equal(coef(nmL), c(a = 5.069866, k = 0.003699669), tol = 4e-7))# seen 4.2e-8
+>
+> ## trivial RHS -- should work even w/o 'start='
+> fi1 <- nls(y ~ a, start = list(a=1))
+> ## -> 2 deprecation warnings "length 1 in vector-arithmetic" from nlsModel() in R 3.4.x ..
+> options(op) # warnings about missing 'start' ok:
+> f.1 <- nls(y ~ a) # failed in R 3.4.x
+Warning in nls(y ~ a) :
+ No starting values specified for some parameters.
+Initializing 'a' to '1.'.
+Consider specifying 'start' or using a selfStart model
+> stopifnot(all.equal(noC(f.1), noC(fi1)),
++ all.equal(coef(f.1), c(a = mean(y))))
+>
> proc.time()
user system elapsed
- 1.604 0.049 1.641
+ 1.615 0.052 1.654
diff --git a/src/library/stats/tests/simulate.Rout.save b/src/library/stats/tests/simulate.Rout.save
index ac3dfe3..9620007 100644
--- a/src/library/stats/tests/simulate.Rout.save
+++ b/src/library/stats/tests/simulate.Rout.save
@@ -1,6 +1,6 @@
-R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer"
-Copyright (C) 2017 The R Foundation for Statistical Computing
+R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On"
+Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -408,4 +408,4 @@ log(u) 0.015569 0.00033659 46.256 5.7704e-10
>
> proc.time()
user system elapsed
- 0.335 0.045 0.362
+ 0.290 0.034 0.306
diff --git a/src/library/stats/tests/smooth.spline.R b/src/library/stats/tests/smooth.spline.R
index 35d3550..963e797 100644
--- a/src/library/stats/tests/smooth.spline.R
+++ b/src/library/stats/tests/smooth.spline.R
@@ -1,7 +1,8 @@
## partly moved from ../man/smooth.spline.Rd , quite system-specific.
##-- artificial example
y18 <- c(1:3, 5, 4, 7:3, 2*(2:5), rep(10, 4))
-(b.64 <- (Sys.info()[["machine"]] == "x86_64"))
+(b.64 <- grepl("^x86.64", Sys.info()[["machine"]]) &&
+ .Machine$sizeof.pointer == 8)
## i386-Linux: Df ~= (even! > ) 18 : interpolating -- much smaller PRESS
## It is the too low 'low = -3' which "kills" the algo; low= -2.6 still ok
## On other platforms, e.g., x64, ends quite differently (and fine)
diff --git a/src/library/tools/R/admin.R b/src/library/tools/R/admin.R
index dba6c68..1b41321 100644
--- a/src/library/tools/R/admin.R
+++ b/src/library/tools/R/admin.R
@@ -1,7 +1,7 @@
# File src/library/tools/R/admin.R
# Part of the R package, https://www.R-project.org
#
-# Copyright (C) 1995-2015 The R Core Team
+# Copyright (C) 1995-2017 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -947,15 +947,16 @@ checkRdaFiles <- function(paths)
res[p, "compress"] <- if(all(magic[1:2] == c(0x1f, 0x8b))) "gzip"
else if(rawToChar(magic[1:3]) == "BZh") "bzip2"
else if(magic[1L] == 0xFD && rawToChar(magic[2:5]) == "7zXZ") "xz"
- else if(grepl("RD[ABX][12]", rawToChar(magic), useBytes = TRUE)) "none"
+ else if(grepl("RD[ABX][1-9]", rawToChar(magic), useBytes = TRUE)) "none"
else "unknown"
con <- gzfile(p)
magic <- readChar(con, 5L, useBytes = TRUE)
close(con)
- res[p, "ASCII"] <- if (grepl("RD[ABX][12]", magic, useBytes = TRUE))
- substr(magic, 3, 3) == "A" else NA
- ver <- sub("(RD[ABX])([12]*)", "\\2", magic, useBytes = TRUE)
- res$version <- as.integer(ver)
+ if (grepl("RD[ABX][1-9]", magic, useBytes = TRUE)) {
+ res[p, "ASCII"] <- substr(magic, 3, 3) == "A"
+ ver <- sub("(RD[ABX])([1-9])", "\\2", magic, useBytes = TRUE)
+ res$version <- as.integer(ver)
+ }
}
res
}
diff --git a/src/library/tools/R/build.R b/src/library/tools/R/build.R
index 3430e9c..6ea97ca 100644
--- a/src/library/tools/R/build.R
+++ b/src/library/tools/R/build.R
@@ -1,7 +1,7 @@
# File src/library/tools/R/build.R
# Part of the R package, https://www.R-project.org
#
-# Copyright (C) 1995-2017 The R Core Team
+# Copyright (C) 1995-2018 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -238,7 +238,7 @@ inRbuildignore <- function(files, pkgdir) {
printLog(Log, " -----------------------------------\n")
unlink(libdir, recursive = TRUE)
printLog(Log, "ERROR: package installation failed\n")
- do_exit(1)
+ do_exit(1L)
}
Sys.setenv("R_BUILD_TEMPLIB" = libdir)
TRUE
@@ -970,9 +970,13 @@ inRbuildignore <- function(files, pkgdir) {
## This should preserve dates and permissions (subject to
## umask, if that is consulted which it seems it usually is not).
## Permissions are increased later.
- cp_sw <- if(Sys.info()[["sysname"]] == "Linux") ## << need GNU cp
- ## unfortunately, '-pr' does not dereference sym.links
- "-Lr --preserve=timestamps" else "-pr"
+ ## -L is to follow (de-reference) symlinks
+ ## --preserve is GNU only: at least macOS, FreeBSD and Solaris
+ ## have non-GNU cp's.
+ ver <- suppressWarnings(system2("cp", "--version", stdout = TRUE,
+ stderr = FALSE))
+ GNU_cp <- any(grepl("GNU coreutils", ver))
+ cp_sw <- if(GNU_cp) "-LR --preserve=timestamps" else "-pR"
if (system(paste("cp", cp_sw, shQuote(pkgname), shQuote(Tdir)))) {
errorLog(Log, "copying to build directory failed")
do_exit(1L)
@@ -999,9 +1003,9 @@ inRbuildignore <- function(files, pkgdir) {
full.names = TRUE, include.dirs = TRUE)
allfiles <- substring(allfiles, 3L) # drop './'
bases <- basename(allfiles)
-
+
exclude <- inRbuildignore(allfiles, pkgdir)
-
+
isdir <- dir.exists(allfiles)
## old (pre-2.10.0) dirnames
exclude <- exclude | (isdir & (bases %in%
diff --git a/src/library/tools/R/check.R b/src/library/tools/R/check.R
index e09631d..c01e319 100644
--- a/src/library/tools/R/check.R
+++ b/src/library/tools/R/check.R
@@ -1,7 +1,7 @@
# File src/library/tools/R/check.R
# Part of the R package, https://www.R-project.org
#
-# Copyright (C) 1995-2017 The R Core Team
+# Copyright (C) 1995-2018 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -1284,9 +1284,9 @@ setRlibs <-
any <- TRUE
printLog(Log, "Problems with news in 'inst/NEWS.Rd':\n")
printLog0(Log,
- paste(" ",
- unlist(strsplit(msg, "\n", fixed = TRUE)),
- sep = "", collapse = "\n"),
+ paste0(" ",
+ unlist(strsplit(msg, "\n", fixed = TRUE)),
+ collapse = "\n"),
"\n")
}
}
@@ -2483,12 +2483,12 @@ setRlibs <-
msg <- if (nBad) {
if(haveObjs)
c("Compiled code should not call entry points which",
- "might terminate R nor write to stdout/stderr instead",
- "of to the console, nor the system RNG.\n")
+ "might terminate R nor write to stdout/stderr instead of",
+ "to the console, nor use Fortran I/O nor system RNGs.\n")
else
c("Compiled code should not call entry points which",
- "might terminate R nor write to stdout/stderr instead",
- "of to the console, nor the system RNG.",
+ "might terminate R nor write to stdout/stderr instead of",
+ "to the console, nor use Fortran I/O nor system RNGs.",
"The detected symbols are linked",
"into the code but might come from libraries",
"and not actually be called.\n")
@@ -3780,7 +3780,9 @@ setRlibs <-
": warning: .* \\[-Wformat-contains-nul\\]",
": warning: .* \\[-Wformat-zero-length\\]",
": warning: .* \\[-Wpointer-to-int-cast\\]",
- ": warning: .* \\[-Wsequence-point\\]")
+ ": warning: .* \\[-Wsequence-point\\]",
+ ## Fatal on clang and Solaris ODS
+ ": warning: .* with a value, in function returning void")
## clang warnings
warn_re <- c(warn_re,
@@ -3843,7 +3845,7 @@ setRlibs <-
lines, invert = TRUE, value = TRUE, useBytes = TRUE)
lines <- grep("warning: *ISO C forbids.*function pointer",
lines, invert = TRUE, value = TRUE, useBytes = TRUE)
- if (WINDOWS)
+ if (WINDOWS)
lines <- grep("warning: *ISO C does not support.*ms_printf length modifier",
lines, invert = TRUE, value = TRUE, useBytes = TRUE)
}
diff --git a/src/library/tools/R/install.R b/src/library/tools/R/install.R
index 9a66d92..6f1e9d7 100644
--- a/src/library/tools/R/install.R
+++ b/src/library/tools/R/install.R
@@ -1808,6 +1808,8 @@
ext <- sub(paste0(base, "."), "", a, fixed = TRUE)
nobj <- ""
if (nzchar(ext)) {
+ ## This will not work if there are no source files in
+ ## the top-level directory
if (ext %in% c("cc", "cpp")) {
with_cxx <- TRUE
nobj <- base
@@ -1877,6 +1879,7 @@
else if (cxxstd == "CXX98") {
use_cxx98 <- TRUE
}
+ with_cxx <- TRUE
}
} else if (file.exists("Makevars")) {
makefiles <- c("Makevars", makefiles)
@@ -1899,6 +1902,7 @@
else if (cxxstd == "CXX98") {
use_cxx98 <- TRUE
}
+ with_cxx <- TRUE
}
}
if (!use_cxx11 && !use_cxx14 && !use_cxx17 && !use_cxx98) {
@@ -1933,6 +1937,7 @@
use_cxx98 <- TRUE
}
}
+ with_cxx <- TRUE
}
if (with_cxx) {
diff --git a/src/library/tools/R/sotools.R b/src/library/tools/R/sotools.R
index 71d0460..e627203 100644
--- a/src/library/tools/R/sotools.R
+++ b/src/library/tools/R/sotools.R
@@ -105,6 +105,10 @@ so_symbol_names_table <-
## libcxx variants
"linux, C++, gxx, std::cout, _ZNSt3__14coutE",
"linux, C++, gxx, std::cerr, _ZNSt3__14cerrE",
+ "linux, Fortran, gfortran, open, _gfortran_st_open",
+ "linux, Fortran, gfortran, close, _gfortran_st_close",
+ "linux, Fortran, gfortran, rewind, _gfortran_st_rewind",
+ "linux, Fortran, gfortran, read, _gfortran_st_read",
"linux, Fortran, gfortran, write, _gfortran_st_write",
"linux, Fortran, gfortran, print, _gfortran_st_write",
"linux, Fortran, gfortran, stop, _gfortran_stop_numeric_f08",
@@ -134,6 +138,10 @@ so_symbol_names_table <-
## libcxx variants
"osx, C++, gxx, std::cout, __ZNSt3__14coutE",
"osx, C++, gxx, std::cerr, __ZNSt3__14cerrE",
+ "osx, Fortran, gfortran, open, __gfortran_st_open",
+ "osx, Fortran, gfortran, close, __gfortran_st_close",
+ "osx, Fortran, gfortran, rewind, _gfortran_st_rewind",
+ "osx, Fortran, gfortran, read, __gfortran_st_read",
"osx, Fortran, gfortran, write, __gfortran_st_write",
"osx, Fortran, gfortran, print, __gfortran_st_write",
"osx, Fortran, gfortran, stop, __gfortran_stop_numeric",
@@ -159,6 +167,10 @@ so_symbol_names_table <-
"freebsd, C, gcc, srand, srand",
"freebsd, C, gcc, srandom, srandom",
"freebsd, C, gcc, srand48, srand48",
+ "freebsd, Fortran, gfortran, open, _gfortran_st_open",
+ "freebsd, Fortran, gfortran, close, _gfortran_st_close",
+ "freebsd, Fortran, gfortran, rewind, _gfortran_st_rewind",
+ "freebsd, Fortran, gfortran, read, _gfortran_st_read",
"freebsd, Fortran, gfortran, write, _gfortran_st_write",
"freebsd, Fortran, gfortran, print, _gfortran_st_write",
"freebsd, Fortran, gfortran, stop, _gfortran_stop_numeric_f08",
@@ -183,6 +195,11 @@ so_symbol_names_table <-
"solaris, C, solcc, srand, srand",
"solaris, C, solcc, srandom, srandom",
"solaris, C, solcc, srand48, srand48",
+ "solaris, Fortran, solf95, open, __f90_open",
+ "solaris, Fortran, solf95, close, __f90_close",
+ "solaris, Fortran, solf95, rewind, __f90_rewind",
+ "solaris, Fortran, solf95, read, __f90_eifr",
+ "solaris, Fortran, solf95, read, __f90_esfr",
"solaris, Fortran, solf95, print, __f90_eslw",
"solaris, Fortran, solf95, write, __f90_eslw",
"solaris, Fortran, solf95, print, __f90_esfw",
@@ -198,6 +215,9 @@ so_symbol_names_table <-
## only in .o, positions hard-coded in check_so_symbols
"windows, C++, g++, std::cout, _ZSt4cout",
"windows, C++, g++, std::cerr, _ZSt4cerr",
+ "windows, Fortran, gfortran, open, _gfortran_st_open",
+ "windows, Fortran, gfortran, close, _gfortran_st_close",
+ "windows, Fortran, gfortran, rewind, _gfortran_st_rewind",
"windows, Fortran, gfortran, write, _gfortran_st_write",
"windows, Fortran, gfortran, print, _gfortran_st_write",
## in DLL
diff --git a/src/library/tools/R/testing.R b/src/library/tools/R/testing.R
index f75aa40..07ee303 100644
--- a/src/library/tools/R/testing.R
+++ b/src/library/tools/R/testing.R
@@ -775,7 +775,7 @@ detachPackages <- function(pkgs, verbose = TRUE)
R.version[["major"]], ".", R.version[["minor"]],
" (r", R.version[["svn rev"]], ")\n", sep = "")
cat("",
- "Copyright (C) 2000-2017 The R Core Team.",
+ "Copyright (C) 2000-2018 The R Core Team.",
"This is free software; see the GNU General Public License version 2",
"or later for copying conditions. There is NO warranty.",
sep = "\n")
diff --git a/src/library/tools/R/utils.R b/src/library/tools/R/utils.R
index 7c91820..f52b28b 100644
--- a/src/library/tools/R/utils.R
+++ b/src/library/tools/R/utils.R
@@ -1762,8 +1762,8 @@ function(x, dfile)
## content.
## Cf. tools::showNonASCII():
asc <- iconv(x, "latin1", "ASCII")
- ind <- is.na(asc) | (asc != x)
- if(any(ind)) {
+ ## fields might have been NA to start with, so use identical.
+ if(!identical(asc, x)) {
warning(gettext("Unknown encoding with non-ASCII data: converting to ASCII"),
domain = NA)
x[ind] <- iconv(x[ind], "latin1", "ASCII", sub = "byte")
diff --git a/src/library/tools/man/Rd2txt_options.Rd b/src/library/tools/man/Rd2txt_options.Rd
index c2a8f54..898f147 100644
--- a/src/library/tools/man/Rd2txt_options.Rd
+++ b/src/library/tools/man/Rd2txt_options.Rd
@@ -39,7 +39,7 @@ Rd2txt_options(...)
expanding \verb{\href} tags.}
\item{code_quote}{(default \code{TRUE}): Whether to render
\verb{\code} and similar with single quotes.}
- \item{underline_titles}{default \code{TRUE}): Whether to render
+ \item{underline_titles}{(default \code{TRUE}): Whether to render
section titles with underlines (via backspacing).}
}
}
diff --git a/src/library/tools/man/checkRdaFiles.Rd b/src/library/tools/man/checkRdaFiles.Rd
index 87ddb03..2676528 100644
--- a/src/library/tools/man/checkRdaFiles.Rd
+++ b/src/library/tools/man/checkRdaFiles.Rd
@@ -1,6 +1,6 @@
% File src/library/tools/man/checkRdaFiles.Rd
% Part of the R package, https://www.R-project.org
-% Copyright 2009-11 R Core Team
+% Copyright 2009-2017 R Core Team
% Distributed under GPL 2 or later
\name{checkRdaFiles}
@@ -28,7 +28,7 @@ resaveRdaFiles(paths, compress = c("auto", "gzip", "bzip2", "xz"),
this specifies a single directory, it is taken to refer to all
\file{.rda} and \file{.RData} files in that directory.}
- \item{compress, compression_level}{type and level of compression: see
+ \item{compress, compression_level}{Type and level of compression: see
\code{\link{save}}. Values of \code{compress} can be abbreviated.}
}
@@ -52,7 +52,8 @@ resaveRdaFiles(paths, compress = c("auto", "gzip", "bzip2", "xz"),
means that if this is an \R save file it is from a later version of
\R).}
\item{version}{integer: the version of the save -- usually \code{2}
- but \code{1} for very old files, and \code{NA} for other files.}
+ but \code{1} for very old files, and \code{NA} for other files.
+ Unfortunately \code{2} means \sQuote{version 2 or later}.}
}
\examples{\dontrun{
## from a package top-level source directory
diff --git a/src/library/tools/man/vignetteDepends.Rd b/src/library/tools/man/vignetteDepends.Rd
index 95a4e4d..b441599 100644
--- a/src/library/tools/man/vignetteDepends.Rd
+++ b/src/library/tools/man/vignetteDepends.Rd
@@ -36,7 +36,7 @@ vignetteDepends(vignette, recursive = TRUE, reduce = TRUE,
If \code{reduce} is \code{TRUE}, the system will collapse the fields in the
\code{DependsList} object such that a minimal set of dependencies
are specified (for instance if there was
- \samp{foo, foo (>= 1.0.0), foo (>= 1.3.0}, it would only return
+ \samp{foo, foo (>= 1.0.0), foo (>= 1.3.0)}, it would only return
\samp{foo (>= 1.3.0)}).
}
\value{
diff --git a/src/library/tools/man/writePACKAGES.Rd b/src/library/tools/man/writePACKAGES.Rd
index 86d34ca..9e7f5a6 100644
--- a/src/library/tools/man/writePACKAGES.Rd
+++ b/src/library/tools/man/writePACKAGES.Rd
@@ -49,8 +49,8 @@ write_PACKAGES(dir = ".", fields = NULL,
\item{unpacked}{a logical indicating whether the package contents are
available in unpacked form or not (default).}
\item{subdirs}{either logical (to indicate if subdirectories should be
- included, recursively) or a character vector of name of subdirectories
- to include.}
+ included, recursively) or a character vector of names of subdirectories
+ to include (which are not recursed).}
\item{latestOnly}{logical: if multiple versions of a package are
available should only the latest version be included?}
\item{addFiles}{logical: should the filenames be included as field
diff --git a/src/library/tools/src/gramLatex.c b/src/library/tools/src/gramLatex.c
index 634647b..a406660 100644
--- a/src/library/tools/src/gramLatex.c
+++ b/src/library/tools/src/gramLatex.c
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.7.12-4996"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -213,11 +213,11 @@ static int mkVerbEnv();
-# ifndef YY_NULL
+# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# define YY_NULLPTR nullptr
# else
-# define YY_NULL 0
+# define YY_NULLPTR 0
# endif
# endif
@@ -230,7 +230,7 @@ static int mkVerbEnv();
#endif
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -238,21 +238,20 @@ static int mkVerbEnv();
extern int yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- END_OF_INPUT = 258,
- ERROR = 259,
- MACRO = 260,
- TEXT = 261,
- COMMENT = 262,
- BEGIN = 263,
- END = 264,
- VERB = 265
- };
+ enum yytokentype
+ {
+ END_OF_INPUT = 258,
+ ERROR = 259,
+ MACRO = 260,
+ TEXT = 261,
+ COMMENT = 262,
+ BEGIN = 263,
+ END = 264,
+ VERB = 265
+ };
#endif
/* Tokens. */
#define END_OF_INPUT 258
@@ -264,43 +263,31 @@ extern int yydebug;
#define END 264
#define VERB 265
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+/* Location type. */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+};
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
+
extern YYSTYPE yylval;
extern YYLTYPE yylloc;
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
@@ -320,11 +307,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -344,8 +328,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -367,11 +350,30 @@ typedef short int yytype_int16;
# endif
#endif
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if (! defined __GNUC__ || __GNUC__ < 2 \
- || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
-# define __attribute__(Spec) /* empty */
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
@@ -382,25 +384,26 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -418,8 +421,7 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
@@ -431,8 +433,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -448,7 +450,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -456,15 +458,13 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -474,8 +474,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -501,16 +501,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
@@ -529,7 +529,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -545,17 +545,19 @@ union yyalloc
#define YYNNTS 9
/* YYNRULES -- Number of rules. */
#define YYNRULES 21
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 36
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 265
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -588,27 +590,7 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
-{
- 0, 0, 3, 6, 8, 10, 12, 14, 17, 20,
- 22, 25, 27, 29, 31, 33, 35, 37, 38, 49,
- 53, 57
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 15, 0, -1, 16, 3, -1, 3, -1, 1, -1,
- 18, -1, 21, -1, 16, 18, -1, 16, 21, -1,
- 18, -1, 17, 18, -1, 6, -1, 7, -1, 5,
- -1, 10, -1, 19, -1, 22, -1, -1, 8, 11,
- 6, 12, 20, 16, 9, 11, 6, 12, -1, 13,
- 17, 13, -1, 11, 16, 12, -1, 11, 12, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
0, 166, 166, 167, 168, 171, 172, 173, 174, 176,
@@ -625,13 +607,13 @@ static const char *const yytname[] =
"$end", "error", "$undefined", "END_OF_INPUT", "ERROR", "MACRO", "TEXT",
"COMMENT", "BEGIN", "END", "VERB", "'{'", "'}'", "'$'", "$accept",
"Init", "Items", "nonMath", "Item", "environment", "$@1", "math",
- "block", YY_NULL
+ "block", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -639,25 +621,29 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 14, 15, 15, 15, 16, 16, 16, 16, 17,
- 17, 18, 18, 18, 18, 18, 18, 20, 19, 21,
- 22, 22
-};
+#define YYPACT_NINF -10
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-10)))
+
+#define YYTABLE_NINF -1
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int8 yypact[] =
{
- 0, 2, 2, 1, 1, 1, 1, 2, 2, 1,
- 2, 1, 1, 1, 1, 1, 1, 0, 10, 3,
- 3, 2
+ 23, -10, -10, -10, -10, -10, -8, -10, 32, 77,
+ 4, 8, -10, -10, -10, -10, 0, -10, 41, 59,
+ -10, -10, -10, -10, -10, -5, -10, -10, -10, -10,
+ 68, 50, -3, 11, 15, -10
};
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
static const yytype_uint8 yydefact[] =
{
0, 4, 3, 13, 11, 12, 0, 14, 0, 0,
@@ -666,33 +652,21 @@ static const yytype_uint8 yydefact[] =
0, 0, 0, 0, 0, 18
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- -1, 10, 11, 19, 12, 13, 30, 14, 15
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -10
-static const yytype_int8 yypact[] =
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int8 yypgoto[] =
{
- 23, -10, -10, -10, -10, -10, -8, -10, 32, 77,
- 4, 8, -10, -10, -10, -10, 0, -10, 41, 59,
- -10, -10, -10, -10, -10, -5, -10, -10, -10, -10,
- 68, 50, -3, 11, 15, -10
+ -10, -10, -7, -10, -9, -10, -10, -6, -10
};
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int8 yypgoto[] =
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
{
- -10, -10, -7, -10, -9, -10, -10, -6, -10
+ -1, 10, 11, 19, 12, 13, 30, 14, 15
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
20, 18, 23, 16, 21, 24, 25, 29, 33, 23,
@@ -706,12 +680,6 @@ static const yytype_uint8 yytable[] =
0, 9, 3, 4, 5, 6, 0, 7, 8
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-10)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
-
static const yytype_int8 yycheck[] =
{
9, 8, 11, 11, 0, 11, 6, 12, 11, 18,
@@ -725,8 +693,8 @@ static const yytype_int8 yycheck[] =
-1, 13, 5, 6, 7, 8, -1, 10, 11
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 1, 3, 5, 6, 7, 8, 10, 11, 13,
@@ -735,30 +703,32 @@ static const yytype_uint8 yystos[] =
20, 16, 9, 11, 6, 12
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 14, 15, 15, 15, 16, 16, 16, 16, 17,
+ 17, 18, 18, 18, 18, 18, 18, 20, 19, 21,
+ 22, 22
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 1, 1, 1, 1, 2, 2, 1,
+ 2, 1, 1, 1, 1, 1, 1, 0, 10, 3,
+ 3, 2
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
#define YYRECOVERING() (!!yyerrstatus)
@@ -775,13 +745,13 @@ do \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
+#define YYTERROR 1
+#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
@@ -791,7 +761,7 @@ while (YYID (0))
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
- if (YYID (N)) \
+ if (N) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -805,12 +775,27 @@ while (YYID (0))
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
- while (YYID (0))
+ while (0)
#endif
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
@@ -820,36 +805,28 @@ while (YYID (0))
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
-__attribute__((__unused__))
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+YY_ATTRIBUTE_UNUSED
static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
-#else
-static unsigned
-yy_location_print_ (yyo, yylocp)
- FILE *yyo;
- YYLTYPE const * const yylocp;
-#endif
{
unsigned res = 0;
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
if (0 <= yylocp->first_line)
{
- res += fprintf (yyo, "%d", yylocp->first_line);
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
if (0 <= yylocp->first_column)
- res += fprintf (yyo, ".%d", yylocp->first_column);
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
}
if (0 <= yylocp->last_line)
{
if (yylocp->first_line < yylocp->last_line)
{
- res += fprintf (yyo, "-%d", yylocp->last_line);
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
if (0 <= end_col)
- res += fprintf (yyo, ".%d", end_col);
+ res += YYFPRINTF (yyo, ".%d", end_col);
}
else if (0 <= end_col && yylocp->first_column < end_col)
- res += fprintf (yyo, "-%d", end_col);
+ res += YYFPRINTF (yyo, "-%d", end_col);
}
return res;
}
@@ -863,67 +840,33 @@ yy_location_print_ (yyo, yylocp)
#endif
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value, Location); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
-#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
+ YYUSE (yylocationp);
if (!yyvaluep)
return;
- YYUSE (yylocationp);
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
YYUSE (yytype);
}
@@ -933,23 +876,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
YY_LOCATION_PRINT (yyoutput, *yylocationp);
YYFPRINTF (yyoutput, ": ");
@@ -962,16 +893,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -982,50 +905,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
-#else
static void
-yy_reduce_print (yyvsp, yylsp, yyrule)
- YYSTYPE *yyvsp;
- YYLTYPE *yylsp;
- int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , &(yylsp[(yyi + 1) - (yynrhs)]) );
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , &(yylsp[(yyi + 1) - (yynrhs)]) );
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, yylsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -1039,7 +954,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -1062,15 +977,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -1086,16 +994,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1125,27 +1025,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -1168,11 +1068,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@@ -1180,10 +1080,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0;
/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
@@ -1233,7 +1129,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
}
yyarg[yycount++] = yytname[yyx];
{
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
@@ -1300,58 +1196,53 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, yylocationp)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- YYLTYPE *yylocationp;
-#endif
{
YYUSE (yyvaluep);
YYUSE (yylocationp);
-
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
switch (yytype)
{
- case 5: /* MACRO */
+ case 5: /* MACRO */
- { UNPROTECT_PTR((*yyvaluep)); };
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 6: /* TEXT */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 6: /* TEXT */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 7: /* COMMENT */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 7: /* COMMENT */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 8: /* BEGIN */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 8: /* BEGIN */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 9: /* END */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 9: /* END */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
+
default:
break;
}
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -1360,26 +1251,14 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp)
/* The lookahead symbol. */
int yychar;
-
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
-
+YYSTYPE yylval;
/* Location data for the lookahead symbol. */
YYLTYPE yylloc
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
= { 1, 1, 1, 1 }
# endif
;
-
-
/* Number of syntax errors so far. */
int yynerrs;
@@ -1388,36 +1267,17 @@ int yynerrs;
| yyparse. |
`----------*/
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
{
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
- `yyls': related to locations.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+ 'yyls': related to locations.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
@@ -1496,26 +1356,26 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
- YYLTYPE *yyls1 = yyls;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yyls1, yysize * sizeof (*yylsp),
- &yystacksize);
-
- yyls = yyls1;
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+ YYLTYPE *yyls1 = yyls;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*yylsp),
+ &yystacksize);
+
+ yyls = yyls1;
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -1523,23 +1383,23 @@ yyparse ()
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
- YYSTACK_RELOCATE (yyls_alloc, yyls);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -1549,10 +1409,10 @@ yyparse ()
yylsp = yyls + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -1581,7 +1441,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex ();
}
if (yychar <= YYEOF)
@@ -1646,7 +1506,7 @@ yyreduce:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -1662,103 +1522,123 @@ yyreduce:
{
case 2:
- { xxsavevalue((yyvsp[(1) - (2)]), &(yyloc)); YYACCEPT; }
+ { xxsavevalue((yyvsp[-1]), &(yyloc)); YYACCEPT; }
+
break;
case 3:
{ xxsavevalue(NULL, &(yyloc)); YYACCEPT; }
+
break;
case 4:
{ PROTECT(parseState.Value = R_NilValue); YYABORT; }
+
break;
case 5:
- { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
+ { (yyval) = xxnewlist((yyvsp[0])); }
+
break;
case 6:
- { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
+ { (yyval) = xxnewlist((yyvsp[0])); }
+
break;
case 7:
- { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
+ { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); }
+
break;
case 8:
- { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
+ { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); }
+
break;
case 9:
- { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
+ { (yyval) = xxnewlist((yyvsp[0])); }
+
break;
case 10:
- { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
+ { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); }
+
break;
case 11:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), TEXT, &(yyloc)); }
+
break;
case 12:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), COMMENT, &(yyloc)); }
+
break;
case 13:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), MACRO, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), MACRO, &(yyloc)); }
+
break;
case 14:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), VERB, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), VERB, &(yyloc)); }
+
break;
case 15:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { (yyval) = (yyvsp[0]); }
+
break;
case 16:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { (yyval) = (yyvsp[0]); }
+
break;
case 17:
- { xxSetInVerbEnv((yyvsp[(3) - (4)])); }
+ { xxSetInVerbEnv((yyvsp[-1])); }
+
break;
case 18:
- { (yyval) = xxenv((yyvsp[(3) - (10)]), (yyvsp[(6) - (10)]), (yyvsp[(9) - (10)]), &(yyloc));
- UNPROTECT_PTR((yyvsp[(1) - (10)])); UNPROTECT_PTR((yyvsp[(7) - (10)])); }
+ { (yyval) = xxenv((yyvsp[-7]), (yyvsp[-4]), (yyvsp[-1]), &(yyloc));
+ UNPROTECT_PTR((yyvsp[-9])); UNPROTECT_PTR((yyvsp[-3])); }
+
break;
case 19:
- { (yyval) = xxmath((yyvsp[(2) - (3)]), &(yyloc)); }
+ { (yyval) = xxmath((yyvsp[-1]), &(yyloc)); }
+
break;
case 20:
- { (yyval) = xxblock((yyvsp[(2) - (3)]), &(yyloc)); }
+ { (yyval) = xxblock((yyvsp[-1]), &(yyloc)); }
+
break;
case 21:
{ (yyval) = xxblock(NULL, &(yyloc)); }
+
break;
@@ -1785,7 +1665,7 @@ yyreduce:
*++yyvsp = yyval;
*++yylsp = yyloc;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -1800,9 +1680,9 @@ yyreduce:
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
@@ -1853,20 +1733,20 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, &yylloc);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, &yylloc);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -1886,7 +1766,7 @@ yyerrorlab:
goto yyerrorlab;
yyerror_range[1] = yylsp[1-yylen];
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -1899,29 +1779,29 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp, yylsp);
+ yystos[yystate], yyvsp, yylsp);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -1977,14 +1857,14 @@ yyreturn:
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc);
}
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp, yylsp);
+ yystos[*yyssp], yyvsp, yylsp);
YYPOPSTACK (1);
}
#ifndef yyoverflow
@@ -1995,14 +1875,11 @@ yyreturn:
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
-
-
static SEXP xxnewlist(SEXP item)
{
SEXP ans, tmp;
diff --git a/src/library/tools/src/gramRd.c b/src/library/tools/src/gramRd.c
index 2f6d3df..42b3b65 100644
--- a/src/library/tools/src/gramRd.c
+++ b/src/library/tools/src/gramRd.c
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.7.12-4996"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -246,11 +246,11 @@ static int mkComment(int);
-# ifndef YY_NULL
+# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# define YY_NULLPTR nullptr
# else
-# define YY_NULL 0
+# define YY_NULLPTR 0
# endif
# endif
@@ -263,7 +263,7 @@ static int mkComment(int);
#endif
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -271,54 +271,53 @@ static int mkComment(int);
extern int yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- END_OF_INPUT = 258,
- ERROR = 259,
- SECTIONHEADER = 260,
- RSECTIONHEADER = 261,
- VSECTIONHEADER = 262,
- SECTIONHEADER2 = 263,
- RCODEMACRO = 264,
- SEXPR = 265,
- RDOPTS = 266,
- LATEXMACRO = 267,
- VERBMACRO = 268,
- OPTMACRO = 269,
- ESCAPE = 270,
- LISTSECTION = 271,
- ITEMIZE = 272,
- DESCRIPTION = 273,
- NOITEM = 274,
- LATEXMACRO2 = 275,
- VERBMACRO2 = 276,
- VERBLATEX = 277,
- LATEXMACRO3 = 278,
- NEWCOMMAND = 279,
- USERMACRO = 280,
- USERMACRO1 = 281,
- USERMACRO2 = 282,
- USERMACRO3 = 283,
- USERMACRO4 = 284,
- USERMACRO5 = 285,
- USERMACRO6 = 286,
- USERMACRO7 = 287,
- USERMACRO8 = 288,
- USERMACRO9 = 289,
- IFDEF = 290,
- ENDIF = 291,
- TEXT = 292,
- RCODE = 293,
- VERB = 294,
- COMMENT = 295,
- UNKNOWN = 296,
- STARTFILE = 297,
- STARTFRAGMENT = 298
- };
+ enum yytokentype
+ {
+ END_OF_INPUT = 258,
+ ERROR = 259,
+ SECTIONHEADER = 260,
+ RSECTIONHEADER = 261,
+ VSECTIONHEADER = 262,
+ SECTIONHEADER2 = 263,
+ RCODEMACRO = 264,
+ SEXPR = 265,
+ RDOPTS = 266,
+ LATEXMACRO = 267,
+ VERBMACRO = 268,
+ OPTMACRO = 269,
+ ESCAPE = 270,
+ LISTSECTION = 271,
+ ITEMIZE = 272,
+ DESCRIPTION = 273,
+ NOITEM = 274,
+ LATEXMACRO2 = 275,
+ VERBMACRO2 = 276,
+ VERBLATEX = 277,
+ LATEXMACRO3 = 278,
+ NEWCOMMAND = 279,
+ USERMACRO = 280,
+ USERMACRO1 = 281,
+ USERMACRO2 = 282,
+ USERMACRO3 = 283,
+ USERMACRO4 = 284,
+ USERMACRO5 = 285,
+ USERMACRO6 = 286,
+ USERMACRO7 = 287,
+ USERMACRO8 = 288,
+ USERMACRO9 = 289,
+ IFDEF = 290,
+ ENDIF = 291,
+ TEXT = 292,
+ RCODE = 293,
+ VERB = 294,
+ COMMENT = 295,
+ UNKNOWN = 296,
+ STARTFILE = 297,
+ STARTFRAGMENT = 298
+ };
#endif
/* Tokens. */
#define END_OF_INPUT 258
@@ -363,43 +362,31 @@ extern int yydebug;
#define STARTFILE 297
#define STARTFRAGMENT 298
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+/* Location type. */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+};
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
+
extern YYSTYPE yylval;
extern YYLTYPE yylloc;
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
@@ -419,11 +406,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -443,8 +427,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -466,11 +449,30 @@ typedef short int yytype_int16;
# endif
#endif
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if (! defined __GNUC__ || __GNUC__ < 2 \
- || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
-# define __attribute__(Spec) /* empty */
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
@@ -481,25 +483,26 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -517,8 +520,7 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
@@ -530,8 +532,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -547,7 +549,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -555,15 +557,13 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -573,8 +573,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -600,16 +600,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
@@ -628,7 +628,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -644,17 +644,19 @@ union yyalloc
#define YYNNTS 31
/* YYNRULES -- Number of rules. */
#define YYNRULES 89
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 194
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 298
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -690,58 +692,7 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 7, 11, 13, 16, 18, 20, 23,
- 26, 29, 32, 35, 38, 42, 47, 52, 56, 61,
- 63, 65, 67, 70, 72, 75, 77, 79, 81, 83,
- 85, 87, 89, 91, 94, 97, 101, 106, 109, 112,
- 116, 121, 124, 128, 133, 136, 139, 143, 145, 150,
- 155, 159, 163, 165, 168, 172, 177, 183, 190, 198,
- 208, 219, 231, 234, 237, 240, 243, 246, 249, 254,
- 258, 261, 264, 269, 273, 276, 277, 278, 279, 280,
- 281, 282, 283, 284, 285, 289, 292, 297, 301, 306
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 49, 0, -1, 42, 51, 3, -1, 43, 50, 3,
- -1, 1, -1, 68, 54, -1, 52, -1, 53, -1,
- 52, 53, -1, 7, 64, -1, 11, 64, -1, 6,
- 62, -1, 5, 58, -1, 16, 61, -1, 8, 58,
- 59, -1, 35, 67, 52, 36, -1, 35, 67, 52,
- 1, -1, 10, 71, 63, -1, 10, 71, 78, 63,
- -1, 40, -1, 37, -1, 57, -1, 1, 53, -1,
- 55, -1, 54, 55, -1, 37, -1, 38, -1, 39,
- -1, 40, -1, 41, -1, 77, -1, 56, -1, 57,
- -1, 1, 55, -1, 12, 58, -1, 20, 58, 59,
- -1, 23, 58, 59, 59, -1, 17, 60, -1, 18,
- 61, -1, 14, 71, 58, -1, 14, 71, 78, 58,
- -1, 9, 62, -1, 10, 71, 63, -1, 10, 71,
- 78, 63, -1, 13, 64, -1, 21, 65, -1, 21,
- 65, 66, -1, 15, -1, 35, 67, 54, 36, -1,
- 35, 67, 54, 1, -1, 22, 64, 59, -1, 24,
- 65, 64, -1, 25, -1, 26, 64, -1, 27, 64,
- 64, -1, 28, 64, 64, 64, -1, 29, 64, 64,
- 64, 64, -1, 30, 64, 64, 64, 64, 64, -1,
- 31, 64, 64, 64, 64, 64, 64, -1, 32, 64,
- 64, 64, 64, 64, 64, 64, 64, -1, 33, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, -1, 34,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- -1, 68, 77, -1, 68, 77, -1, 68, 37, -1,
- 75, 77, -1, 76, 77, -1, 69, 77, -1, 44,
- 70, 54, 45, -1, 44, 70, 45, -1, 72, 77,
- -1, 73, 77, -1, 44, 74, 54, 45, -1, 44,
- 74, 45, -1, 68, 37, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 44, 54, 45, -1, 44,
- 45, -1, 44, 54, 1, 45, -1, 44, 1, 45,
- -1, 44, 54, 1, 3, -1, 46, 55, 47, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 214, 214, 215, 216, 219, 222, 225, 226, 228,
@@ -775,13 +726,13 @@ static const char *const yytname[] =
"RLikeArg", "RLikeArg2", "VerbatimArg", "VerbatimArg1", "VerbatimArg2",
"IfDefTarget", "goLatexLike", "goRLike", "goRLike2", "goOption",
"goVerbatim", "goVerbatim1", "goVerbatim2", "goItem0", "goItem2", "Arg",
- "Option", YY_NULL
+ "Option", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -792,73 +743,18 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 48, 49, 49, 49, 50, 51, 52, 52, 53,
- 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
- 53, 53, 53, 54, 54, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 56, 56, 56, 56, 56, 56,
- 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 57, 57, 57, 57, 57, 57, 57, 57, 57,
- 57, 57, 58, 59, 59, 60, 61, 62, 63, 63,
- 64, 65, 66, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, 75, 76, 77, 77, 77, 77, 77, 78
-};
+#define YYPACT_NINF -94
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 3, 3, 1, 2, 1, 1, 2, 2,
- 2, 2, 2, 2, 3, 4, 4, 3, 4, 1,
- 1, 1, 2, 1, 2, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 2, 3, 4, 2, 2, 3,
- 4, 2, 3, 4, 2, 2, 3, 1, 4, 4,
- 3, 3, 1, 2, 3, 4, 5, 6, 7, 9,
- 10, 11, 2, 2, 2, 2, 2, 2, 4, 3,
- 2, 2, 4, 3, 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 2, 4, 3, 4, 3
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-94)))
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 0, 4, 0, 75, 0, 0, 75, 76, 79, 75,
- 78, 79, 83, 80, 52, 79, 79, 79, 79, 79,
- 79, 79, 79, 79, 75, 20, 19, 0, 0, 7,
- 21, 0, 0, 1, 22, 12, 0, 11, 0, 9,
- 0, 75, 0, 10, 13, 0, 79, 0, 53, 79,
- 79, 79, 79, 79, 79, 79, 79, 0, 0, 2,
- 8, 3, 0, 76, 78, 75, 79, 78, 47, 82,
- 83, 75, 80, 79, 75, 75, 25, 26, 27, 28,
- 29, 0, 0, 23, 31, 32, 30, 62, 67, 70,
- 14, 0, 77, 0, 17, 0, 66, 51, 71, 54,
- 79, 79, 79, 79, 79, 79, 79, 0, 74, 33,
- 41, 0, 34, 44, 75, 37, 0, 38, 75, 45,
- 75, 75, 0, 0, 85, 0, 24, 64, 63, 0,
- 0, 18, 55, 79, 79, 79, 79, 79, 79, 0,
- 15, 42, 0, 39, 75, 65, 35, 81, 46, 50,
- 75, 0, 87, 0, 84, 69, 0, 89, 56, 79,
- 79, 79, 79, 79, 43, 40, 0, 36, 0, 48,
- 88, 86, 68, 57, 79, 79, 79, 79, 73, 0,
- 58, 79, 79, 79, 72, 79, 79, 79, 59, 79,
- 79, 60, 79, 61
-};
+#define YYTABLE_NINF -50
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 4, 31, 27, 28, 29, 82, 83, 84, 85,
- 35, 90, 115, 44, 37, 94, 39, 46, 148, 57,
- 36, 38, 129, 42, 40, 47, 166, 116, 45, 86,
- 95
-};
+#define yytable_value_is_error(Yytable_value) \
+ 0
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -94
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int16 yypact[] =
{
28, -94, 792, -94, 20, 792, -94, -94, -94, -94,
@@ -883,7 +779,34 @@ static const yytype_int16 yypact[] =
-94, -94, -94, -94
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 0, 4, 0, 75, 0, 0, 75, 76, 79, 75,
+ 78, 79, 83, 80, 52, 79, 79, 79, 79, 79,
+ 79, 79, 79, 79, 75, 20, 19, 0, 0, 7,
+ 21, 0, 0, 1, 22, 12, 0, 11, 0, 9,
+ 0, 75, 0, 10, 13, 0, 79, 0, 53, 79,
+ 79, 79, 79, 79, 79, 79, 79, 0, 0, 2,
+ 8, 3, 0, 76, 78, 75, 79, 78, 47, 82,
+ 83, 75, 80, 79, 75, 75, 25, 26, 27, 28,
+ 29, 0, 0, 23, 31, 32, 30, 62, 67, 70,
+ 14, 0, 77, 0, 17, 0, 66, 51, 71, 54,
+ 79, 79, 79, 79, 79, 79, 79, 0, 74, 33,
+ 41, 0, 34, 44, 75, 37, 0, 38, 75, 45,
+ 75, 75, 0, 0, 85, 0, 24, 64, 63, 0,
+ 0, 18, 55, 79, 79, 79, 79, 79, 79, 0,
+ 15, 42, 0, 39, 75, 65, 35, 81, 46, 50,
+ 75, 0, 87, 0, 84, 69, 0, 89, 56, 79,
+ 79, 79, 79, 79, 43, 40, 0, 36, 0, 48,
+ 88, 86, 68, 57, 79, 79, 79, 79, 73, 0,
+ 58, 79, 79, 79, 72, 79, 79, 79, 59, 79,
+ 79, 60, 79, 61
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-94, -94, -94, -94, 3, -2, -64, -10, -94, 22,
@@ -892,10 +815,18 @@ static const yytype_int8 yypgoto[] =
-58
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -50
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 4, 31, 27, 28, 29, 82, 83, 84, 85,
+ 35, 90, 115, 44, 37, 94, 39, 46, 148, 57,
+ 36, 38, 129, 42, 40, 47, 166, 116, 45, 86,
+ 95
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
43, 41, 131, 34, 48, 49, 50, 51, 52, 53,
@@ -984,12 +915,6 @@ static const yytype_int16 yytable[] =
0, 0, 26
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-94)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
-
static const yytype_int16 yycheck[] =
{
11, 9, 95, 5, 15, 16, 17, 18, 19, 20,
@@ -1078,8 +1003,8 @@ static const yytype_int16 yycheck[] =
-1, -1, 40
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 1, 42, 43, 49, 1, 5, 6, 7, 8,
@@ -1104,30 +1029,44 @@ static const yytype_uint8 yystos[] =
64, 64, 64, 64
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 48, 49, 49, 49, 50, 51, 52, 52, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 54, 54, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 57, 57, 57, 57, 57, 57, 57, 57, 57,
+ 57, 57, 58, 59, 59, 60, 61, 62, 63, 63,
+ 64, 65, 66, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 77, 77, 77, 77, 78
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 3, 3, 1, 2, 1, 1, 2, 2,
+ 2, 2, 2, 2, 3, 4, 4, 3, 4, 1,
+ 1, 1, 2, 1, 2, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 2, 3, 4, 2, 2, 3,
+ 4, 2, 3, 4, 2, 2, 3, 1, 4, 4,
+ 3, 3, 1, 2, 3, 4, 5, 6, 7, 9,
+ 10, 11, 2, 2, 2, 2, 2, 2, 4, 3,
+ 2, 2, 4, 3, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 2, 4, 3, 4, 3
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
#define YYRECOVERING() (!!yyerrstatus)
@@ -1144,13 +1083,13 @@ do \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
+#define YYTERROR 1
+#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
@@ -1160,7 +1099,7 @@ while (YYID (0))
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
- if (YYID (N)) \
+ if (N) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -1174,12 +1113,27 @@ while (YYID (0))
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
- while (YYID (0))
+ while (0)
#endif
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
@@ -1189,36 +1143,28 @@ while (YYID (0))
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
-__attribute__((__unused__))
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+YY_ATTRIBUTE_UNUSED
static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
-#else
-static unsigned
-yy_location_print_ (yyo, yylocp)
- FILE *yyo;
- YYLTYPE const * const yylocp;
-#endif
{
unsigned res = 0;
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
if (0 <= yylocp->first_line)
{
- res += fprintf (yyo, "%d", yylocp->first_line);
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
if (0 <= yylocp->first_column)
- res += fprintf (yyo, ".%d", yylocp->first_column);
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
}
if (0 <= yylocp->last_line)
{
if (yylocp->first_line < yylocp->last_line)
{
- res += fprintf (yyo, "-%d", yylocp->last_line);
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
if (0 <= end_col)
- res += fprintf (yyo, ".%d", end_col);
+ res += YYFPRINTF (yyo, ".%d", end_col);
}
else if (0 <= end_col && yylocp->first_column < end_col)
- res += fprintf (yyo, "-%d", end_col);
+ res += YYFPRINTF (yyo, "-%d", end_col);
}
return res;
}
@@ -1232,67 +1178,33 @@ yy_location_print_ (yyo, yylocp)
#endif
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value, Location); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
-#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
+ YYUSE (yylocationp);
if (!yyvaluep)
return;
- YYUSE (yylocationp);
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
YYUSE (yytype);
}
@@ -1302,23 +1214,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
YY_LOCATION_PRINT (yyoutput, *yylocationp);
YYFPRINTF (yyoutput, ": ");
@@ -1331,16 +1231,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -1351,50 +1243,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
-#else
static void
-yy_reduce_print (yyvsp, yylsp, yyrule)
- YYSTYPE *yyvsp;
- YYLTYPE *yylsp;
- int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , &(yylsp[(yyi + 1) - (yynrhs)]) );
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , &(yylsp[(yyi + 1) - (yynrhs)]) );
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, yylsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -1408,7 +1292,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -1431,15 +1315,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -1455,16 +1332,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1494,27 +1363,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -1537,11 +1406,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@@ -1549,10 +1418,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0;
/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
@@ -1602,7 +1467,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
}
yyarg[yycount++] = yytname[yyx];
{
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
@@ -1669,303 +1534,347 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, yylocationp)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- YYLTYPE *yylocationp;
-#endif
{
YYUSE (yyvaluep);
YYUSE (yylocationp);
-
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
switch (yytype)
{
- case 5: /* SECTIONHEADER */
+ case 5: /* SECTIONHEADER */
- { UNPROTECT_PTR((*yyvaluep)); };
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 6: /* RSECTIONHEADER */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 6: /* RSECTIONHEADER */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 7: /* VSECTIONHEADER */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 7: /* VSECTIONHEADER */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 8: /* SECTIONHEADER2 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 8: /* SECTIONHEADER2 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 9: /* RCODEMACRO */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 9: /* RCODEMACRO */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 10: /* SEXPR */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 10: /* SEXPR */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 12: /* LATEXMACRO */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 12: /* LATEXMACRO */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 13: /* VERBMACRO */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 13: /* VERBMACRO */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 14: /* OPTMACRO */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 14: /* OPTMACRO */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 15: /* ESCAPE */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 15: /* ESCAPE */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 16: /* LISTSECTION */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 16: /* LISTSECTION */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 17: /* ITEMIZE */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 17: /* ITEMIZE */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 18: /* DESCRIPTION */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 18: /* DESCRIPTION */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 19: /* NOITEM */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 19: /* NOITEM */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 20: /* LATEXMACRO2 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 20: /* LATEXMACRO2 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 21: /* VERBMACRO2 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 21: /* VERBMACRO2 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 22: /* VERBLATEX */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 22: /* VERBLATEX */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 23: /* LATEXMACRO3 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 23: /* LATEXMACRO3 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 24: /* NEWCOMMAND */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 24: /* NEWCOMMAND */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 25: /* USERMACRO */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 25: /* USERMACRO */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 26: /* USERMACRO1 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 26: /* USERMACRO1 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 27: /* USERMACRO2 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 27: /* USERMACRO2 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 28: /* USERMACRO3 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 28: /* USERMACRO3 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 29: /* USERMACRO4 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 29: /* USERMACRO4 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 30: /* USERMACRO5 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 30: /* USERMACRO5 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 31: /* USERMACRO6 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 31: /* USERMACRO6 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 32: /* USERMACRO7 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 32: /* USERMACRO7 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 33: /* USERMACRO8 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 33: /* USERMACRO8 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 34: /* USERMACRO9 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 34: /* USERMACRO9 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 35: /* IFDEF */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 35: /* IFDEF */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 36: /* ENDIF */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 36: /* ENDIF */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 37: /* TEXT */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 37: /* TEXT */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 38: /* RCODE */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 38: /* RCODE */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 39: /* VERB */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 39: /* VERB */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 40: /* COMMENT */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 40: /* COMMENT */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 41: /* UNKNOWN */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 41: /* UNKNOWN */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 42: /* STARTFILE */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 42: /* STARTFILE */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 43: /* STARTFRAGMENT */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 43: /* STARTFRAGMENT */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 54: /* ArgItems */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 54: /* ArgItems */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 58: /* LatexArg */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 58: /* LatexArg */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 63: /* RLikeArg2 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 63: /* RLikeArg2 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 65: /* VerbatimArg1 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 65: /* VerbatimArg1 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 66: /* VerbatimArg2 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 66: /* VerbatimArg2 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 67: /* IfDefTarget */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 67: /* IfDefTarget */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 68: /* goLatexLike */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 68: /* goLatexLike */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 69: /* goRLike */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 69: /* goRLike */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 70: /* goRLike2 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 70: /* goRLike2 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 71: /* goOption */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 71: /* goOption */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 72: /* goVerbatim */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 72: /* goVerbatim */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 73: /* goVerbatim1 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 73: /* goVerbatim1 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 74: /* goVerbatim2 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 74: /* goVerbatim2 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 75: /* goItem0 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 75: /* goItem0 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 76: /* goItem2 */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 76: /* goItem2 */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
- case 78: /* Option */
- { UNPROTECT_PTR((*yyvaluep)); };
+ case 78: /* Option */
+
+ { UNPROTECT_PTR(((*yyvaluep))); }
break;
+
default:
break;
}
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -1974,26 +1883,14 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp)
/* The lookahead symbol. */
int yychar;
-
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
-
+YYSTYPE yylval;
/* Location data for the lookahead symbol. */
YYLTYPE yylloc
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
= { 1, 1, 1, 1 }
# endif
;
-
-
/* Number of syntax errors so far. */
int yynerrs;
@@ -2002,36 +1899,17 @@ int yynerrs;
| yyparse. |
`----------*/
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
{
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
- `yyls': related to locations.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+ 'yyls': related to locations.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
@@ -2110,26 +1988,26 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
- YYLTYPE *yyls1 = yyls;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yyls1, yysize * sizeof (*yylsp),
- &yystacksize);
-
- yyls = yyls1;
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+ YYLTYPE *yyls1 = yyls;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*yylsp),
+ &yystacksize);
+
+ yyls = yyls1;
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -2137,23 +2015,23 @@ yyparse ()
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
- YYSTACK_RELOCATE (yyls_alloc, yyls);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -2163,10 +2041,10 @@ yyparse ()
yylsp = yyls + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -2195,7 +2073,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex ();
}
if (yychar <= YYEOF)
@@ -2260,7 +2138,7 @@ yyreduce:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -2276,449 +2154,537 @@ yyreduce:
{
case 2:
- { xxsavevalue((yyvsp[(2) - (3)]), &(yyloc)); UNPROTECT_PTR((yyvsp[(1) - (3)])); YYACCEPT; }
+ { xxsavevalue((yyvsp[-1]), &(yyloc)); UNPROTECT_PTR((yyvsp[-2])); YYACCEPT; }
+
break;
case 3:
- { xxsavevalue((yyvsp[(2) - (3)]), &(yyloc)); UNPROTECT_PTR((yyvsp[(1) - (3)])); YYACCEPT; }
+ { xxsavevalue((yyvsp[-1]), &(yyloc)); UNPROTECT_PTR((yyvsp[-2])); YYACCEPT; }
+
break;
case 4:
{ PROTECT(parseState.Value = R_NilValue); YYABORT; }
+
break;
case 5:
- { (yyval) = (yyvsp[(2) - (2)]); UNPROTECT_PTR((yyvsp[(1) - (2)])); }
+ { (yyval) = (yyvsp[0]); UNPROTECT_PTR((yyvsp[-1])); }
+
break;
case 6:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { (yyval) = (yyvsp[0]); }
+
break;
case 7:
- { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
+ { (yyval) = xxnewlist((yyvsp[0])); }
+
break;
case 8:
- { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
+ { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); }
+
break;
case 9:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 10:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), HAS_SEXPR, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); }
+
break;
case 11:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 12:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 13:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 14:
- { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup2((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), 2, STATIC, &(yyloc)); }
+
break;
case 15:
- { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[(4) - (4)])); }
+ { (yyval) = xxmarkup2((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[0])); }
+
break;
case 16:
- { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); }
+ { (yyval) = xxmarkup2((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), 2, HAS_IFDEF, &(yyloc)); }
+
break;
case 17:
- { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); }
+ { (yyval) = xxmarkup((yyvsp[-2]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[-1])); }
+
break;
case 18:
- { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); }
+ { (yyval) = xxOptionmarkup((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[-2])); }
+
break;
case 19:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), COMMENT, &(yyloc)); }
+
break;
case 20:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), TEXT, &(yyloc)); }
+
break;
case 21:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { (yyval) = (yyvsp[0]); }
+
break;
case 22:
- { (yyval) = (yyvsp[(2) - (2)]); }
+ { (yyval) = (yyvsp[0]); }
+
break;
case 23:
- { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
+ { (yyval) = xxnewlist((yyvsp[0])); }
+
break;
case 24:
- { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
+ { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); }
+
break;
case 25:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), TEXT, &(yyloc)); }
+
break;
case 26:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), RCODE, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), RCODE, &(yyloc)); }
+
break;
case 27:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), VERB, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), VERB, &(yyloc)); }
+
break;
case 28:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); }
+ { (yyval) = xxtag((yyvsp[0]), COMMENT, &(yyloc)); }
+
break;
case 29:
- { (yyval) = xxtag((yyvsp[(1) - (1)]), UNKNOWN, &(yyloc)); yyerror(yyunknown); }
+ { (yyval) = xxtag((yyvsp[0]), UNKNOWN, &(yyloc)); yyerror(yyunknown); }
+
break;
case 30:
- { (yyval) = xxmarkup(R_NilValue, (yyvsp[(1) - (1)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup(R_NilValue, (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 31:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { (yyval) = (yyvsp[0]); }
+
break;
case 32:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { (yyval) = (yyvsp[0]); }
+
break;
case 33:
- { (yyval) = (yyvsp[(2) - (2)]); }
+ { (yyval) = (yyvsp[0]); }
+
break;
case 34:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 35:
- { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup2((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), 2, STATIC, &(yyloc)); }
+
break;
case 36:
- { (yyval) = xxmarkup3((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup3((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 37:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 38:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 39:
- { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), STATIC, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); }
+ { (yyval) = xxmarkup((yyvsp[-2]), (yyvsp[0]), STATIC, &(yyloc)); xxpopMode((yyvsp[-1])); }
+
break;
case 40:
- { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), STATIC, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); }
+ { (yyval) = xxOptionmarkup((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); xxpopMode((yyvsp[-2])); }
+
break;
case 41:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 42:
- { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); }
+ { (yyval) = xxmarkup((yyvsp[-2]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[-1])); }
+
break;
case 43:
- { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); }
+ { (yyval) = xxOptionmarkup((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[-2])); }
+
break;
case 44:
- { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); }
+
break;
case 45:
- { (yyval) = xxmarkup2((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), R_NilValue, 1, STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup2((yyvsp[-1]), (yyvsp[0]), R_NilValue, 1, STATIC, &(yyloc)); }
+
break;
case 46:
- { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup2((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), 2, STATIC, &(yyloc)); }
+
break;
case 47:
- { (yyval) = xxmarkup((yyvsp[(1) - (1)]), R_NilValue, STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup((yyvsp[0]), R_NilValue, STATIC, &(yyloc)); }
+
break;
case 48:
- { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[(4) - (4)])); }
+ { (yyval) = xxmarkup2((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[0])); }
+
break;
case 49:
- { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); }
+ { (yyval) = xxmarkup2((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), 2, HAS_IFDEF, &(yyloc)); }
+
break;
case 50:
- { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); }
+ { (yyval) = xxmarkup2((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), 2, STATIC, &(yyloc)); }
+
break;
case 51:
- { (yyval) = xxnewcommand((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), &(yyloc)); }
+ { (yyval) = xxnewcommand((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), &(yyloc)); }
+
break;
case 52:
- { (yyval) = xxusermacro((yyvsp[(1) - (1)]), xxnewlist(NULL), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[0]), xxnewlist(NULL), &(yyloc)); }
+
break;
case 53:
- { (yyval) = xxusermacro((yyvsp[(1) - (2)]), xxnewlist((yyvsp[(2) - (2)])), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[-1]), xxnewlist((yyvsp[0])), &(yyloc)); }
+
break;
case 54:
- { (yyval) = xxusermacro((yyvsp[(1) - (3)]), xxnewlist2((yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[-2]), xxnewlist2((yyvsp[-1]), (yyvsp[0])), &(yyloc)); }
+
break;
case 55:
- { (yyval) = xxusermacro((yyvsp[(1) - (4)]), xxnewlist3((yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)])), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[-3]), xxnewlist3((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])), &(yyloc)); }
+
break;
case 56:
- { (yyval) = xxusermacro((yyvsp[(1) - (5)]), xxnewlist4((yyvsp[(2) - (5)]), (yyvsp[(3) - (5)]), (yyvsp[(4) - (5)]), (yyvsp[(5) - (5)])), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[-4]), xxnewlist4((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])), &(yyloc)); }
+
break;
case 57:
- { (yyval) = xxusermacro((yyvsp[(1) - (6)]), xxnewlist5((yyvsp[(2) - (6)]), (yyvsp[(3) - (6)]), (yyvsp[(4) - (6)]), (yyvsp[(5) - (6)]), (yyvsp[(6) - (6)])), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[-5]), xxnewlist5((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])), &(yyloc)); }
+
break;
case 58:
- { (yyval) = xxusermacro((yyvsp[(1) - (7)]), xxnewlist6((yyvsp[(2) - (7)]), (yyvsp[(3) - (7)]), (yyvsp[(4) - (7)]), (yyvsp[(5) - (7)]), (yyvsp[(6) - (7)]), (yyvsp[(7) - (7)])), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[-6]), xxnewlist6((yyvsp[-5]), (yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])), &(yyloc)); }
+
break;
case 59:
- { (yyval) = xxusermacro((yyvsp[(1) - (9)]), xxnewlist7((yyvsp[(2) - (9)]), (yyvsp[(3) - (9)]), (yyvsp[(4) - (9)]), (yyvsp[(5) - (9)]), (yyvsp[(6) - (9)]), (yyvsp[(7) - (9)]), (yyvsp[(8) - (9)])), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[-8]), xxnewlist7((yyvsp[-7]), (yyvsp[-6]), (yyvsp[-5]), (yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1])), &(yyloc)); }
+
break;
case 60:
- { (yyval) = xxusermacro((yyvsp[(1) - (10)]), xxnewlist8((yyvsp[(2) - (10)]), (yyvsp[(3) - (10)]), (yyvsp[(4) - (10)]), (yyvsp[(5) - (10)]), (yyvsp[(6) - (10)]), (yyvsp[(7) - (10)]), (yyvsp[(8) - (10)]), (yyvsp[(9) - (10)])), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[-9]), xxnewlist8((yyvsp[-8]), (yyvsp[-7]), (yyvsp[-6]), (yyvsp[-5]), (yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1])), &(yyloc)); }
+
break;
case 61:
- { (yyval) = xxusermacro((yyvsp[(1) - (11)]), xxnewlist9((yyvsp[(2) - (11)]), (yyvsp[(3) - (11)]), (yyvsp[(4) - (11)]), (yyvsp[(5) - (11)]), (yyvsp[(6) - (11)]), (yyvsp[(7) - (11)]), (yyvsp[(8) - (11)]), (yyvsp[(9) - (11)]), (yyvsp[(10) - (11)])), &(yyloc)); }
+ { (yyval) = xxusermacro((yyvsp[-10]), xxnewlist9((yyvsp[-9]), (yyvsp[-8]), (yyvsp[-7]), (yyvsp[-6]), (yyvsp[-5]), (yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1])), &(yyloc)); }
+
break;
case 62:
- { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
+ { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); }
+
break;
case 63:
- { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
+ { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); }
+
break;
case 64:
- { xxpopMode((yyvsp[(1) - (2)])); (yyval) = xxnewlist((yyvsp[(2) - (2)]));
+ { xxpopMode((yyvsp[-1])); (yyval) = xxnewlist((yyvsp[0]));
if(wCalls)
warning(_("bad markup (extra space?) at %s:%d:%d"),
- parseState.xxBasename, (yylsp[(2) - (2)]).first_line, (yylsp[(2) - (2)]).first_column);
+ parseState.xxBasename, (yylsp[0]).first_line, (yylsp[0]).first_column);
else
warningcall(R_NilValue, _("bad markup (extra space?) at %s:%d:%d"),
- parseState.xxBasename, (yylsp[(2) - (2)]).first_line, (yylsp[(2) - (2)]).first_column);
+ parseState.xxBasename, (yylsp[0]).first_line, (yylsp[0]).first_column);
}
+
break;
case 65:
- { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
+ { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); }
+
break;
case 66:
- { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
+ { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); }
+
break;
case 67:
- { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
+ { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); }
+
break;
case 68:
- { xxpopMode((yyvsp[(2) - (4)])); (yyval) = (yyvsp[(3) - (4)]); }
+ { xxpopMode((yyvsp[-2])); (yyval) = (yyvsp[-1]); }
+
break;
case 69:
- { xxpopMode((yyvsp[(2) - (3)])); (yyval) = xxnewlist(NULL); }
+ { xxpopMode((yyvsp[-1])); (yyval) = xxnewlist(NULL); }
+
break;
case 70:
- { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
+ { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); }
+
break;
case 71:
- { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
+ { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); }
+
break;
case 72:
- { xxpopMode((yyvsp[(2) - (4)])); (yyval) = (yyvsp[(3) - (4)]); }
+ { xxpopMode((yyvsp[-2])); (yyval) = (yyvsp[-1]); }
+
break;
case 73:
- { xxpopMode((yyvsp[(2) - (3)])); (yyval) = xxnewlist(NULL); }
+ { xxpopMode((yyvsp[-1])); (yyval) = xxnewlist(NULL); }
+
break;
case 74:
- { xxpopMode((yyvsp[(1) - (2)])); (yyval) = xxnewlist(xxtag((yyvsp[(2) - (2)]), TEXT, &(yyloc))); }
+ { xxpopMode((yyvsp[-1])); (yyval) = xxnewlist(xxtag((yyvsp[0]), TEXT, &(yyloc))); }
+
break;
case 75:
{ (yyval) = xxpushMode(LATEXLIKE, UNKNOWN, FALSE); }
+
break;
case 76:
{ (yyval) = xxpushMode(RLIKE, UNKNOWN, FALSE); }
+
break;
case 77:
{ parseState.xxbraceDepth--; (yyval) = xxpushMode(RLIKE, UNKNOWN, FALSE); parseState.xxbraceDepth++; }
+
break;
case 78:
{ (yyval) = xxpushMode(INOPTION, UNKNOWN, FALSE); }
+
break;
case 79:
{ (yyval) = xxpushMode(VERBATIM, UNKNOWN, FALSE); }
+
break;
case 80:
{ (yyval) = xxpushMode(VERBATIM, UNKNOWN, TRUE); }
+
break;
case 81:
{ parseState.xxbraceDepth--; (yyval) = xxpushMode(VERBATIM, UNKNOWN, FALSE); parseState.xxbraceDepth++; }
+
break;
case 82:
{ (yyval) = xxpushMode(LATEXLIKE, ESCAPE, FALSE); }
+
break;
case 83:
{ (yyval) = xxpushMode(LATEXLIKE, LATEXMACRO2, FALSE); }
+
break;
case 84:
- { (yyval) = (yyvsp[(2) - (3)]); }
+ { (yyval) = (yyvsp[-1]); }
+
break;
case 85:
{ (yyval) = xxnewlist(NULL); }
+
break;
case 86:
- { (yyval) = (yyvsp[(2) - (4)]); }
+ { (yyval) = (yyvsp[-2]); }
+
break;
case 87:
{ (yyval) = xxnewlist(NULL); }
+
break;
case 88:
- { (yyval) = (yyvsp[(2) - (4)]); }
+ { (yyval) = (yyvsp[-2]); }
+
break;
case 89:
- { (yyval) = (yyvsp[(2) - (3)]); }
+ { (yyval) = (yyvsp[-1]); }
+
break;
@@ -2745,7 +2711,7 @@ yyreduce:
*++yyvsp = yyval;
*++yylsp = yyloc;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -2760,9 +2726,9 @@ yyreduce:
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
@@ -2813,20 +2779,20 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, &yylloc);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, &yylloc);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -2846,7 +2812,7 @@ yyerrorlab:
goto yyerrorlab;
yyerror_range[1] = yylsp[1-yylen];
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -2859,29 +2825,29 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp, yylsp);
+ yystos[yystate], yyvsp, yylsp);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -2937,14 +2903,14 @@ yyreturn:
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc);
}
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp, yylsp);
+ yystos[*yyssp], yyvsp, yylsp);
YYPOPSTACK (1);
}
#ifndef yyoverflow
@@ -2955,14 +2921,11 @@ yyreturn:
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
-
-
static SEXP xxpushMode(int newmode, int newitem, int neweqn)
{
SEXP ans;
diff --git a/src/library/utils/R/sourceutils.R b/src/library/utils/R/sourceutils.R
index 18d4cb4..f71da35 100644
--- a/src/library/utils/R/sourceutils.R
+++ b/src/library/utils/R/sourceutils.R
@@ -1,7 +1,7 @@
# File src/library/utils/R/sourceutils.R
# Part of the R package, https://www.R-project.org
#
-# Copyright (C) 1995-2016 The R Core Team
+# Copyright (C) 1995-2017 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,10 +28,10 @@ removeSource <- function(fn) {
attr(part, "srcref") <- NULL
attr(part, "wholeSrcref") <- NULL
attr(part, "srcfile") <- NULL
- if (is.language(part) && is.recursive(part)) {
- for (i in seq_along(part))
- part[[i]] <- recurse(part[[i]])
- }
+ if (is.language(part) && is.recursive(part)) {
+ for (i in seq_along(part))
+ part[i] <- list(recurse(part[[i]])) # recurse(*) may be NULL
+ }
part
}
body(fn) <- recurse(body(fn))
@@ -62,9 +62,9 @@ getSrcDirectory <- function(x, unique=TRUE) {
getSrcref <- function(x) {
if (inherits(x, "srcref")) return(x)
if (!is.null(srcref <- attr(x, "srcref"))) return(srcref)
- if (is.function(x) && !is.null(srcref <- getSrcref(body(x))))
+ if (is.function(x) && !is.null(srcref <- getSrcref(body(x))))
return(srcref)
- if (methods::is(x, "MethodDefinition"))
+ if (methods::is(x, "MethodDefinition"))
return(getSrcref(unclass(methods::unRematchDefinition(x))))
NULL
}
@@ -116,9 +116,9 @@ substr_with_tabs <- function(x, start, stop, tabsize = 8) {
}
getParseData <- function(x, includeText = NA) {
- if (inherits(x, "srcfile"))
+ if (inherits(x, "srcfile"))
srcfile <- x
- else
+ else
srcfile <- getSrcfile(x)
if (is.null(srcfile))
@@ -149,7 +149,7 @@ getParseData <- function(x, includeText = NA) {
if (length(gettext))
data$text[gettext] <- getParseText(data, data$id[gettext])
}
- data
+ data
}
getParseText <- function(parseData, id) {
diff --git a/src/library/utils/inst/doc/Sweave.pdf b/src/library/utils/inst/doc/Sweave.pdf
index 1b3ff8b..5daa6f1 100644
--- a/src/library/utils/inst/doc/Sweave.pdf
+++ b/src/library/utils/inst/doc/Sweave.pdf
Binary files differ
diff --git a/src/library/utils/man/INSTALL.Rd b/src/library/utils/man/INSTALL.Rd
index 3ef1918..a5f6875 100644
--- a/src/library/utils/man/INSTALL.Rd
+++ b/src/library/utils/man/INSTALL.Rd
@@ -177,6 +177,6 @@
(on the Help menu in \code{RGui}),
#endif
\code{\link{RShowDoc}} and the \file{doc/manual} subdirectory of the
- \R source tree).
+ \R source tree.
}
\keyword{utilities}
diff --git a/src/library/utils/man/Question.Rd b/src/library/utils/man/Question.Rd
index ce94489..c5da166 100644
--- a/src/library/utils/man/Question.Rd
+++ b/src/library/utils/man/Question.Rd
@@ -45,7 +45,7 @@
appear on their own such as unary and binary operators,
\code{function} and control-flow \link{reserved} words (including
\code{if}, \code{else} \code{for}, \code{in}, \code{repeat},
- \code{while}, \code{break} and \code{next}. The other \code{reserved}
+ \code{while}, \code{break} and \code{next}). The other \code{reserved}
words can be used as if they were names, for example \code{TRUE},
\code{NA} and \code{Inf}.
}
diff --git a/src/library/utils/man/adist.Rd b/src/library/utils/man/adist.Rd
index c7229a8..b392c63 100644
--- a/src/library/utils/man/adist.Rd
+++ b/src/library/utils/man/adist.Rd
@@ -33,7 +33,7 @@ adist(x, y = NULL, costs = NULL, counts = FALSE, fixed = TRUE,
elements are used as string literals. Otherwise, they are taken as
regular expressions and \code{partial = TRUE} is implied
(corresponding to the approximate string distance used by
- \code{\link{agrep}} with \code{fixed = FALSE}.}
+ \code{\link{agrep}} with \code{fixed = FALSE}).}
\item{partial}{a logical indicating whether the transformed \code{x}
elements must exactly match the complete \code{y} elements, or only
substrings of these. The latter corresponds to the approximate
diff --git a/src/library/utils/man/format.Rd b/src/library/utils/man/format.Rd
index 19cb57d..286739c 100644
--- a/src/library/utils/man/format.Rd
+++ b/src/library/utils/man/format.Rd
@@ -27,7 +27,7 @@ formatOL(x, type = "arabic", offset = 0, start = 1,
labels in the ordered list. If \code{"arabic"} (default), arabic
numerals are used. For \code{"Alph"} or \code{"alph"}, single upper
or lower case letters are employed (in this case, the number of the
- last item must not exceed 26. Finally, for \code{"Roman"} or
+ last item must not exceed 26). Finally, for \code{"Roman"} or
\code{"roman"}, the labels are given as upper or lower case roman
numerals (with the number of the last item maximally 3899).
\code{type} can be given as a unique abbreviation of the above, or
diff --git a/src/library/utils/man/help.Rd b/src/library/utils/man/help.Rd
index fc97d67..b3a577b 100644
--- a/src/library/utils/man/help.Rd
+++ b/src/library/utils/man/help.Rd
@@ -35,7 +35,7 @@ help(topic, package = NULL, lib.loc = NULL,
or \code{NULL}. The default value of \code{NULL} corresponds to all
libraries currently known. If the default is used, the loaded
packages are searched before the libraries. This is not used for
- HTML help (see \sQuote{Details}.}
+ HTML help (see \sQuote{Details}).}
\item{verbose}{logical; if \code{TRUE}, the file name is reported.}
\item{try.all.packages}{logical; see \code{Note}.}
\item{help_type}{character string: the type of help required.
diff --git a/src/library/utils/man/news.Rd b/src/library/utils/man/news.Rd
index 0f5f9bf..20d7512 100644
--- a/src/library/utils/man/news.Rd
+++ b/src/library/utils/man/news.Rd
@@ -50,7 +50,7 @@ news(query, package = "R", lib.loc = NULL, format = NULL,
File \file{inst/NEWS.Rd} should be an Rd file given the entries as Rd
\verb{\itemize} lists, grouped according to version using
\verb{section} elements with names starting with a suitable prefix
- (e.g.\sspace{}\dQuote{Changes in version} followed by a space and the version
+ (e.g.\sspace{}\dQuote{Changes in version}) followed by a space and the version
number, and optionally followed by a space and a parenthesized ISO
8601 (\%Y-\%m-\%d, see \code{\link{strptime}}) format date, and
possibly further grouped according to categories using
diff --git a/src/library/utils/man/rcompgen.Rd b/src/library/utils/man/rcompgen.Rd
index 5661e04..7503fba 100644
--- a/src/library/utils/man/rcompgen.Rd
+++ b/src/library/utils/man/rcompgen.Rd
@@ -100,11 +100,11 @@ rc.options(\dots)
\item{\code{quotes}:}{ Enables completion in \R code when inside
quotes. This normally leads to filename completion, but can be
otherwise depending on context (for example, when the open quote
- is preceded by \code{?}, help completion is invoked. Setting
+ is preceded by \code{?}), help completion is invoked. Setting
this to \code{FALSE} relegates completion to the underlying
completion front-end, which may do its own processing (for
example, \code{readline} on Unix-alikes will do filename
- completion. }
+ completion). }
\item{\code{files}:}{ Deprecated. Use \code{quotes} instead. }
diff --git a/src/library/utils/man/relist.Rd b/src/library/utils/man/relist.Rd
index 7911cb0..1661ef7 100644
--- a/src/library/utils/man/relist.Rd
+++ b/src/library/utils/man/relist.Rd
@@ -67,7 +67,7 @@ is.relistable(x)
ll <- function(param.vector)
{
- param <- relist(param.vector, skeleton = ipar))
+ param <- relist(param.vector, skeleton = ipar)
-sum(mvdnorm(x, mean = param$mean, vcov = param$vcov,
log = TRUE))
}
diff --git a/src/main/character.c b/src/main/character.c
index fcbfed6..4240a0e 100644
--- a/src/main/character.c
+++ b/src/main/character.c
@@ -1,7 +1,7 @@
/*
* R : A Computer Language for Statistical Data Analysis
* Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka
- * Copyright (C) 1997--2016 The R Core Team
+ * Copyright (C) 1997--2018 The R Core Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Pulic License as published by
@@ -254,7 +254,7 @@ SEXP attribute_hidden do_nchar(SEXP call, SEXP op, SEXP args, SEXP env)
int *s_ = INTEGER(s);
for (R_xlen_t i = 0; i < len; i++) {
SEXP sxi = STRING_ELT(x, i);
- char msg_i[20]; sprintf(msg_i, "element %ld", (long)i+1);
+ char msg_i[30]; sprintf(msg_i, "element %ld", (long)i+1);
s_[i] = R_nchar(sxi, type_, allowNA, keepNA, msg_i);
}
R_FreeStringBufferL(&cbuff);
diff --git a/src/main/connections.c b/src/main/connections.c
index f54c27c..9ebfd4b 100644
--- a/src/main/connections.c
+++ b/src/main/connections.c
@@ -576,7 +576,13 @@ static Rboolean file_open(Rconnection con)
fp = R_fopen(name, con->mode);
} else { /* use file("stdin") to refer to the file and not the console */
#ifdef HAVE_FDOPEN
- fp = fdopen(dup(0), con->mode);
+ int dstdin = dup(0);
+# ifdef Win32
+ if (strchr(con->mode, 'b'))
+ /* fdopen won't set dstdin to binary mode */
+ setmode(dstdin, _O_BINARY);
+# endif
+ fp = fdopen(dstdin, con->mode);
#else
warning(_("cannot open file '%s': %s"), name,
"fdopen is not supported on this platform");
diff --git a/src/main/deparse.c b/src/main/deparse.c
index a5a95dd..a2d7529 100644
--- a/src/main/deparse.c
+++ b/src/main/deparse.c
@@ -1308,6 +1308,7 @@ static void print2buff(const char *strng, LocalParseData *d)
*/
#define NB 1000 /* Same as printutils.c */
+#define NB2 2*NB+25
static const char *EncodeNonFiniteComplexElement(Rcomplex x, char* buff)
{
int w, d, e, wi, di, ei;
@@ -1321,8 +1322,8 @@ static const char *EncodeNonFiniteComplexElement(Rcomplex x, char* buff)
strcpy(Re, EncodeReal0(x.r, w, d, e, "."));
strcpy(Im, EncodeReal0(x.i, wi, di, ei, "."));
- snprintf(buff, NB, "complex(real=%s, imaginary=%s)", Re, Im);
- buff[NB-1] = '\0';
+ snprintf(buff, NB2, "complex(real=%s, imaginary=%s)", Re, Im);
+ buff[NB2-1] = '\0';
return buff;
}
@@ -1451,7 +1452,7 @@ static void vector2buff(SEXP vector, LocalParseData *d)
} else if(TYPEOF(vector) == CPLXSXP &&
(ISNAN(COMPLEX(vector)[i].r) || !R_FINITE(COMPLEX(vector)[i].i)) ) {
if (!buff)
- buff = alloca(NB);
+ buff = alloca(NB2);
strp = EncodeNonFiniteComplexElement(COMPLEX(vector)[i], buff);
} else if (allNA && TYPEOF(vector) == STRSXP &&
STRING_ELT(vector, i) == NA_STRING) {
diff --git a/src/main/errors.c b/src/main/errors.c
index 01ceb53..250e9e7 100644
--- a/src/main/errors.c
+++ b/src/main/errors.c
@@ -605,6 +605,8 @@ static SEXP GetSrcLoc(SEXP srcref)
static char errbuf[BUFSIZE];
+#define ERRBUFCAT(txt) strncat(errbuf, txt, BUFSIZE - 1 - strlen(errbuf))
+
const char *R_curErrorBuf() {
return (const char *)errbuf;
}
@@ -707,18 +709,18 @@ verrorcall_dflt(SEXP call, const char *format, va_list ap)
*p = '\n';
} else msgline1 = wd(tmp);
if (14 + wd(dcall) + msgline1 > LONGWARN)
- strcat(errbuf, tail);
+ ERRBUFCAT(tail);
} else {
size_t msgline1 = strlen(tmp);
char *p = strchr(tmp, '\n');
if (p) msgline1 = (int)(p - tmp);
if (14 + strlen(dcall) + msgline1 > LONGWARN)
- strcat(errbuf, tail);
+ ERRBUFCAT(tail);
}
- strcat(errbuf, tmp);
+ ERRBUFCAT(tmp);
} else {
snprintf(errbuf, BUFSIZE, _("Error: "));
- strcat(errbuf, tmp); // FIXME
+ ERRBUFCAT(tmp); // FIXME
}
UNPROTECT(protected);
}
@@ -728,17 +730,26 @@ verrorcall_dflt(SEXP call, const char *format, va_list ap)
Rvsnprintf(p, min(BUFSIZE, R_WarnLength) - strlen(errbuf), format, ap);
}
- p = errbuf + strlen(errbuf) - 1;
- if(*p != '\n') strcat(errbuf, "\n");
+ size_t nc = strlen(errbuf);
+ if (nc == BUFSIZE - 1) {
+ errbuf[BUFSIZE - 4] = '.';
+ errbuf[BUFSIZE - 3] = '.';
+ errbuf[BUFSIZE - 2] = '.';
+ errbuf[BUFSIZE - 1] = '\n';
+ }
+ else {
+ p = errbuf + nc - 1;
+ if(*p != '\n') ERRBUFCAT("\n");
+ }
if(R_ShowErrorCalls && call != R_NilValue) { /* assume we want to avoid deparse */
tr = R_ConciseTraceback(call, 0);
size_t nc = strlen(tr);
if (nc && nc + strlen(errbuf) + 8 < BUFSIZE) {
- strcat(errbuf, _("Calls:"));
- strcat(errbuf, " ");
- strcat(errbuf, tr);
- strcat(errbuf, "\n");
+ ERRBUFCAT(_("Calls:"));
+ ERRBUFCAT(" ");
+ ERRBUFCAT(tr);
+ ERRBUFCAT("\n");
}
}
if (R_ShowErrorMessages) REprintf("%s", errbuf);
@@ -1641,7 +1652,17 @@ static void vsignalError(SEXP call, const char *format, va_list ap)
UNPROTECT(4);
}
}
- else gotoExitingHandler(R_NilValue, call, entry);
+ else {
+ /* Allocating the string here before the jump is not ideal
+ but allows use of tryCatch expressions in on.exit
+ calls. The altarnative would be to allocate a buffer
+ for each tryCatch, but that seems excessive. */
+ PROTECT(entry);
+ SEXP msg = mkString(errbuf);
+ UNPROTECT(1);
+ gotoExitingHandler(msg, call, entry);
+
+ }
}
R_HandlerStack = oldstack;
}
diff --git a/src/main/eval.c b/src/main/eval.c
index e46985a..8cf7413 100644
--- a/src/main/eval.c
+++ b/src/main/eval.c
@@ -262,19 +262,19 @@ static void doprof(int sig) /* sig is ignored in Windows */
real. */
SEXP arg1 = CADR(fun);
SEXP arg2 = CADDR(fun);
- char arg2buf[PROFITEMMAX];
+ char arg2buf[PROFITEMMAX-5];
if (TYPEOF(arg2) == SYMSXP) {
- snprintf(arg2buf, PROFITEMMAX-1, "%s", CHAR(PRINTNAME(arg2)));
+ snprintf(arg2buf, PROFITEMMAX-6, "%s", CHAR(PRINTNAME(arg2)));
} else if (TYPEOF(arg2) == STRSXP) {
- snprintf(arg2buf, PROFITEMMAX-1, "\"%s\"", CHAR(STRING_ELT(arg2, 0)));
+ snprintf(arg2buf, PROFITEMMAX-6, "\"%s\"", CHAR(STRING_ELT(arg2, 0)));
} else if (TYPEOF(arg2) == INTSXP) {
- snprintf(arg2buf, PROFITEMMAX-1, "%d", INTEGER(arg2)[0]);
+ snprintf(arg2buf, PROFITEMMAX-6, "%d", INTEGER(arg2)[0]);
} else if (TYPEOF(arg2) == REALSXP) {
- snprintf(arg2buf, PROFITEMMAX-1, "%.0f", REAL(arg2)[0]);
+ snprintf(arg2buf, PROFITEMMAX-6, "%.0f", REAL(arg2)[0]);
} else {
/* Shouldn't get here, but just in case. */
diff --git a/src/main/gram.c b/src/main/gram.c
index fdacc65..5103580 100644
--- a/src/main/gram.c
+++ b/src/main/gram.c
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.7.12-4996"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -354,11 +354,11 @@ static int xxvalue(SEXP, int, YYLTYPE *);
-# ifndef YY_NULL
+# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# define YY_NULLPTR nullptr
# else
-# define YY_NULL 0
+# define YY_NULLPTR 0
# endif
# endif
@@ -371,7 +371,7 @@ static int xxvalue(SEXP, int, YYLTYPE *);
#endif
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -379,62 +379,61 @@ static int xxvalue(SEXP, int, YYLTYPE *);
extern int yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- END_OF_INPUT = 258,
- ERROR = 259,
- STR_CONST = 260,
- NUM_CONST = 261,
- NULL_CONST = 262,
- SYMBOL = 263,
- FUNCTION = 264,
- INCOMPLETE_STRING = 265,
- LEFT_ASSIGN = 266,
- EQ_ASSIGN = 267,
- RIGHT_ASSIGN = 268,
- LBB = 269,
- FOR = 270,
- IN = 271,
- IF = 272,
- ELSE = 273,
- WHILE = 274,
- NEXT = 275,
- BREAK = 276,
- REPEAT = 277,
- GT = 278,
- GE = 279,
- LT = 280,
- LE = 281,
- EQ = 282,
- NE = 283,
- AND = 284,
- OR = 285,
- AND2 = 286,
- OR2 = 287,
- NS_GET = 288,
- NS_GET_INT = 289,
- COMMENT = 290,
- LINE_DIRECTIVE = 291,
- SYMBOL_FORMALS = 292,
- EQ_FORMALS = 293,
- EQ_SUB = 294,
- SYMBOL_SUB = 295,
- SYMBOL_FUNCTION_CALL = 296,
- SYMBOL_PACKAGE = 297,
- COLON_ASSIGN = 298,
- SLOT = 299,
- LOW = 300,
- TILDE = 301,
- NOT = 302,
- UNOT = 303,
- SPECIAL = 304,
- UPLUS = 305,
- UMINUS = 306
- };
+ enum yytokentype
+ {
+ END_OF_INPUT = 258,
+ ERROR = 259,
+ STR_CONST = 260,
+ NUM_CONST = 261,
+ NULL_CONST = 262,
+ SYMBOL = 263,
+ FUNCTION = 264,
+ INCOMPLETE_STRING = 265,
+ LEFT_ASSIGN = 266,
+ EQ_ASSIGN = 267,
+ RIGHT_ASSIGN = 268,
+ LBB = 269,
+ FOR = 270,
+ IN = 271,
+ IF = 272,
+ ELSE = 273,
+ WHILE = 274,
+ NEXT = 275,
+ BREAK = 276,
+ REPEAT = 277,
+ GT = 278,
+ GE = 279,
+ LT = 280,
+ LE = 281,
+ EQ = 282,
+ NE = 283,
+ AND = 284,
+ OR = 285,
+ AND2 = 286,
+ OR2 = 287,
+ NS_GET = 288,
+ NS_GET_INT = 289,
+ COMMENT = 290,
+ LINE_DIRECTIVE = 291,
+ SYMBOL_FORMALS = 292,
+ EQ_FORMALS = 293,
+ EQ_SUB = 294,
+ SYMBOL_SUB = 295,
+ SYMBOL_FUNCTION_CALL = 296,
+ SYMBOL_PACKAGE = 297,
+ COLON_ASSIGN = 298,
+ SLOT = 299,
+ LOW = 300,
+ TILDE = 301,
+ UNOT = 302,
+ NOT = 303,
+ SPECIAL = 304,
+ UMINUS = 305,
+ UPLUS = 306
+ };
#endif
/* Tokens. */
#define END_OF_INPUT 258
@@ -481,49 +480,37 @@ extern int yydebug;
#define SLOT 299
#define LOW 300
#define TILDE 301
-#define NOT 302
-#define UNOT 303
+#define UNOT 302
+#define NOT 303
#define SPECIAL 304
-#define UPLUS 305
-#define UMINUS 306
-
-
+#define UMINUS 305
+#define UPLUS 306
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+/* Location type. */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+};
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
+
extern YYSTYPE yylval;
extern YYLTYPE yylloc;
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
@@ -543,11 +530,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -567,8 +551,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -590,11 +573,30 @@ typedef short int yytype_int16;
# endif
#endif
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if (! defined __GNUC__ || __GNUC__ < 2 \
- || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
-# define __attribute__(Spec) /* empty */
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
@@ -605,25 +607,26 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -641,8 +644,7 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
@@ -654,8 +656,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -671,7 +673,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -679,15 +681,13 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -697,8 +697,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -724,16 +724,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
@@ -752,7 +752,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -768,17 +768,19 @@ union yyalloc
#define YYNNTS 13
/* YYNRULES -- Number of rules. */
#define YYNRULES 90
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 163
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 306
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -815,60 +817,7 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 5, 7, 10, 13, 15, 17, 19,
- 23, 25, 27, 29, 31, 35, 39, 42, 45, 48,
- 51, 54, 58, 62, 66, 70, 74, 78, 82, 86,
- 90, 94, 98, 102, 106, 110, 114, 118, 122, 126,
- 130, 134, 138, 142, 149, 154, 158, 164, 168, 172,
- 175, 181, 186, 190, 194, 198, 202, 206, 210, 214,
- 218, 222, 226, 230, 234, 236, 238, 242, 246, 252,
- 253, 255, 259, 262, 266, 269, 271, 276, 277, 279,
- 282, 286, 289, 293, 296, 300, 301, 303, 307, 311,
- 317
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 74, 0, -1, 3, -1, 64, -1, 75, 64, -1,
- 75, 65, -1, 1, -1, 77, -1, 76, -1, 77,
- 12, 75, -1, 6, -1, 5, -1, 7, -1, 8,
- -1, 66, 81, 67, -1, 62, 75, 68, -1, 52,
- 77, -1, 51, 77, -1, 69, 77, -1, 47, 77,
- -1, 45, 77, -1, 77, 56, 77, -1, 77, 51,
- 77, -1, 77, 52, 77, -1, 77, 53, 77, -1,
- 77, 54, 77, -1, 77, 59, 77, -1, 77, 55,
- 77, -1, 77, 70, 77, -1, 77, 47, 77, -1,
- 77, 45, 77, -1, 77, 25, 77, -1, 77, 26,
- 77, -1, 77, 27, 77, -1, 77, 28, 77, -1,
- 77, 24, 77, -1, 77, 23, 77, -1, 77, 29,
- 77, -1, 77, 30, 77, -1, 77, 31, 77, -1,
- 77, 32, 77, -1, 77, 11, 77, -1, 77, 13,
- 77, -1, 9, 62, 84, 68, 85, 75, -1, 77,
- 62, 82, 68, -1, 17, 79, 75, -1, 17, 79,
- 75, 18, 75, -1, 15, 80, 75, -1, 19, 78,
- 75, -1, 22, 75, -1, 77, 14, 82, 71, 71,
- -1, 77, 63, 82, 71, -1, 8, 33, 8, -1,
- 8, 33, 5, -1, 5, 33, 8, -1, 5, 33,
- 5, -1, 8, 34, 8, -1, 8, 34, 5, -1,
- 5, 34, 8, -1, 5, 34, 5, -1, 77, 60,
- 8, -1, 77, 60, 5, -1, 77, 61, 8, -1,
- 77, 61, 5, -1, 20, -1, 21, -1, 62, 77,
- 68, -1, 62, 77, 68, -1, 62, 8, 16, 77,
- 68, -1, -1, 75, -1, 81, 65, 75, -1, 81,
- 65, -1, 81, 64, 75, -1, 81, 64, -1, 83,
- -1, 82, 85, 72, 83, -1, -1, 77, -1, 8,
- 12, -1, 8, 12, 77, -1, 5, 12, -1, 5,
- 12, 77, -1, 7, 12, -1, 7, 12, 77, -1,
- -1, 8, -1, 8, 12, 77, -1, 84, 72, 8,
- -1, 84, 72, 8, 12, 77, -1, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 334, 334, 335, 336, 337, 338, 341, 342, 345,
@@ -896,17 +845,17 @@ static const char *const yytname[] =
"NE", "AND", "OR", "AND2", "OR2", "NS_GET", "NS_GET_INT", "COMMENT",
"LINE_DIRECTIVE", "SYMBOL_FORMALS", "EQ_FORMALS", "EQ_SUB", "SYMBOL_SUB",
"SYMBOL_FUNCTION_CALL", "SYMBOL_PACKAGE", "COLON_ASSIGN", "SLOT", "'?'",
- "LOW", "'~'", "TILDE", "NOT", "UNOT", "'+'", "'-'", "'*'", "'/'",
- "SPECIAL", "':'", "UPLUS", "UMINUS", "'^'", "'$'", "'@'", "'('", "'['",
+ "LOW", "'~'", "TILDE", "UNOT", "NOT", "'+'", "'-'", "'*'", "'/'",
+ "SPECIAL", "':'", "UMINUS", "UPLUS", "'^'", "'$'", "'@'", "'('", "'['",
"'\\n'", "';'", "'{'", "'}'", "')'", "'!'", "'%'", "']'", "','",
"$accept", "prog", "expr_or_assign", "equal_assign", "expr", "cond",
- "ifcond", "forcond", "exprlist", "sublist", "sub", "formlist", "cr", YY_NULL
+ "ifcond", "forcond", "exprlist", "sublist", "sub", "formlist", "cr", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -920,70 +869,18 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 73, 74, 74, 74, 74, 74, 75, 75, 76,
- 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
- 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
- 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
- 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
- 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
- 77, 77, 77, 77, 77, 77, 78, 79, 80, 81,
- 81, 81, 81, 81, 81, 82, 82, 83, 83, 83,
- 83, 83, 83, 83, 83, 84, 84, 84, 84, 84,
- 85
-};
+#define YYPACT_NINF -64
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 1, 1, 2, 2, 1, 1, 1, 3,
- 1, 1, 1, 1, 3, 3, 2, 2, 2, 2,
- 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 6, 4, 3, 5, 3, 3, 2,
- 5, 4, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 1, 1, 3, 3, 5, 0,
- 1, 3, 2, 3, 2, 1, 4, 0, 1, 2,
- 3, 2, 3, 2, 3, 0, 1, 3, 3, 5,
- 0
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-64)))
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 0, 6, 2, 11, 10, 12, 13, 0, 0, 0,
- 0, 64, 65, 0, 0, 0, 0, 0, 0, 3,
- 69, 0, 0, 0, 8, 7, 0, 0, 0, 0,
- 85, 0, 0, 0, 0, 0, 0, 49, 20, 19,
- 17, 16, 0, 70, 0, 18, 1, 4, 5, 0,
- 0, 0, 77, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 77, 77, 0, 55, 54, 59,
- 58, 53, 52, 57, 56, 86, 0, 0, 47, 0,
- 45, 0, 48, 15, 74, 72, 14, 41, 9, 42,
- 11, 12, 13, 78, 90, 75, 36, 35, 31, 32,
- 33, 34, 37, 38, 39, 40, 30, 29, 22, 23,
- 24, 25, 27, 21, 26, 61, 60, 63, 62, 90,
- 90, 28, 0, 90, 0, 0, 67, 0, 66, 73,
- 71, 81, 83, 79, 0, 0, 44, 51, 87, 0,
- 88, 0, 46, 82, 84, 80, 50, 77, 43, 0,
- 68, 76, 89
-};
+#define YYTABLE_NINF -1
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 22, 23, 24, 25, 36, 34, 32, 44, 104,
- 105, 86, 145
-};
+#define yytable_value_is_error(Yytable_value) \
+ (!!((Yytable_value) == (-1)))
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -64
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int16 yypact[] =
{
85, -64, -64, 37, -64, -64, 63, -56, -46, -44,
@@ -1005,17 +902,47 @@ static const yytype_int16 yypact[] =
-64, -64, 429
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 0, 6, 2, 11, 10, 12, 13, 0, 0, 0,
+ 0, 64, 65, 0, 0, 0, 0, 0, 0, 3,
+ 69, 0, 0, 0, 8, 7, 0, 0, 0, 0,
+ 85, 0, 0, 0, 0, 0, 0, 49, 20, 19,
+ 17, 16, 0, 70, 0, 18, 1, 4, 5, 0,
+ 0, 0, 77, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 77, 77, 0, 55, 54, 59,
+ 58, 53, 52, 57, 56, 86, 0, 0, 47, 0,
+ 45, 0, 48, 15, 74, 72, 14, 41, 9, 42,
+ 11, 12, 13, 78, 90, 75, 36, 35, 31, 32,
+ 33, 34, 37, 38, 39, 40, 30, 29, 22, 23,
+ 24, 25, 27, 21, 26, 61, 60, 63, 62, 90,
+ 90, 28, 0, 90, 0, 0, 67, 0, 66, 73,
+ 71, 81, 83, 79, 0, 0, 44, 51, 87, 0,
+ 88, 0, 46, 82, 84, 80, 50, 77, 43, 0,
+ 68, 76, 89
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-64, -64, 45, -64, -14, -64, -64, -64, -64, 40,
-35, -64, -10
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 22, 23, 24, 25, 36, 34, 32, 44, 104,
+ 105, 86, 145
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
38, 39, 40, 41, 141, 133, 30, 45, 143, 134,
@@ -1098,12 +1025,6 @@ static const yytype_int16 yytable[] =
0, 0, 76
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-64)))
-
-#define yytable_value_is_error(Yytable_value) \
- (!!((Yytable_value) == (-1)))
-
static const yytype_int16 yycheck[] =
{
14, 15, 16, 17, 12, 68, 62, 21, 12, 72,
@@ -1186,8 +1107,8 @@ static const yytype_int16 yycheck[] =
-1, -1, 70
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 1, 3, 5, 6, 7, 8, 9, 15, 17,
@@ -1209,30 +1130,46 @@ static const yytype_uint8 yystos[] =
68, 83, 77
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 73, 74, 74, 74, 74, 74, 75, 75, 76,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 78, 79, 80, 81,
+ 81, 81, 81, 81, 81, 82, 82, 83, 83, 83,
+ 83, 83, 83, 83, 83, 84, 84, 84, 84, 84,
+ 85
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 1, 2, 2, 1, 1, 1, 3,
+ 1, 1, 1, 1, 3, 3, 2, 2, 2, 2,
+ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 6, 4, 3, 5, 3, 3, 2,
+ 5, 4, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 1, 1, 3, 3, 5, 0,
+ 1, 3, 2, 3, 2, 1, 4, 0, 1, 2,
+ 3, 2, 3, 2, 3, 0, 1, 3, 3, 5,
+ 0
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
#define YYRECOVERING() (!!yyerrstatus)
@@ -1249,13 +1186,13 @@ do \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
+#define YYTERROR 1
+#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
@@ -1265,7 +1202,7 @@ while (YYID (0))
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
- if (YYID (N)) \
+ if (N) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -1279,12 +1216,27 @@ while (YYID (0))
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
- while (YYID (0))
+ while (0)
#endif
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
@@ -1294,36 +1246,28 @@ while (YYID (0))
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
-__attribute__((__unused__))
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+YY_ATTRIBUTE_UNUSED
static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
-#else
-static unsigned
-yy_location_print_ (yyo, yylocp)
- FILE *yyo;
- YYLTYPE const * const yylocp;
-#endif
{
unsigned res = 0;
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
if (0 <= yylocp->first_line)
{
- res += fprintf (yyo, "%d", yylocp->first_line);
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
if (0 <= yylocp->first_column)
- res += fprintf (yyo, ".%d", yylocp->first_column);
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
}
if (0 <= yylocp->last_line)
{
if (yylocp->first_line < yylocp->last_line)
{
- res += fprintf (yyo, "-%d", yylocp->last_line);
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
if (0 <= end_col)
- res += fprintf (yyo, ".%d", end_col);
+ res += YYFPRINTF (yyo, ".%d", end_col);
}
else if (0 <= end_col && yylocp->first_column < end_col)
- res += fprintf (yyo, "-%d", end_col);
+ res += YYFPRINTF (yyo, "-%d", end_col);
}
return res;
}
@@ -1337,67 +1281,33 @@ yy_location_print_ (yyo, yylocp)
#endif
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
-/* Enable debugging if requested. */
-#if YYDEBUG
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value, Location); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
-#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
+ YYUSE (yylocationp);
if (!yyvaluep)
return;
- YYUSE (yylocationp);
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
YYUSE (yytype);
}
@@ -1407,23 +1317,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
YY_LOCATION_PRINT (yyoutput, *yylocationp);
YYFPRINTF (yyoutput, ": ");
@@ -1436,16 +1334,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -1456,50 +1346,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
-#else
static void
-yy_reduce_print (yyvsp, yylsp, yyrule)
- YYSTYPE *yyvsp;
- YYLTYPE *yylsp;
- int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , &(yylsp[(yyi + 1) - (yynrhs)]) );
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , &(yylsp[(yyi + 1) - (yynrhs)]) );
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, yylsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -1513,7 +1395,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -1536,15 +1418,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -1560,16 +1435,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1599,27 +1466,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -1642,11 +1509,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@@ -1654,10 +1521,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0;
/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
@@ -1707,7 +1570,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
}
yyarg[yycount++] = yytname[yyx];
{
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
@@ -1774,28 +1637,18 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, yylocationp)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- YYLTYPE *yylocationp;
-#endif
{
YYUSE (yyvaluep);
YYUSE (yylocationp);
-
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -1804,26 +1657,14 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp)
/* The lookahead symbol. */
int yychar;
-
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
-
+YYSTYPE yylval;
/* Location data for the lookahead symbol. */
YYLTYPE yylloc
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
= { 1, 1, 1, 1 }
# endif
;
-
-
/* Number of syntax errors so far. */
int yynerrs;
@@ -1832,36 +1673,17 @@ int yynerrs;
| yyparse. |
`----------*/
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
{
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
- `yyls': related to locations.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+ 'yyls': related to locations.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
@@ -1940,26 +1762,26 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
- YYLTYPE *yyls1 = yyls;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yyls1, yysize * sizeof (*yylsp),
- &yystacksize);
-
- yyls = yyls1;
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+ YYLTYPE *yyls1 = yyls;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*yylsp),
+ &yystacksize);
+
+ yyls = yyls1;
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -1967,23 +1789,23 @@ yyparse ()
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
- YYSTACK_RELOCATE (yyls_alloc, yyls);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -1993,10 +1815,10 @@ yyparse ()
yylsp = yyls + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -2025,7 +1847,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex ();
}
if (yychar <= YYEOF)
@@ -2090,7 +1912,7 @@ yyreduce:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `